DATA TYPE :
Data type of a variable is the set of values that the variable may assume.
Basic Data Types in C :
int , char , float , double
Basic Data Types in PASCAL :
integer , real , char , boolean
ABSTRACT DATA TYPE :
An ADT is a set of elements with a collection of well defined operations.
1)The operations can take operands from not only the instances of the ADT but other types of operands or instances of other ADTs.
2)Similarly results need not be instances of the ADT.
3)At least one operand or the result is of the ADT type in question.
Object Oriented languages such as C++ and Java provide explicite support for expressing ADTs by means of Classes.
DATA STRUCTURE :
A Data Structure is an implementation of an ADT.That is it is a translation of ADT into statements of a programming language.It consists of
1)The declarations that define a variable to be of that ADT type.
2)The operations defined on the ADT(using procedures of the programming language).
An ADT implementation chooses a data structure to represent the ADT.
Each data structure is built up from the basic data types of the underlying programming language using the available data structuring facilities , such as
arrays ,records (structures in C) , pointers , files , sets , etc.
A ” Queue ” is an abstract data type which can be defined as a sequence of elements with operations such as ENQUEUE(x,Q),DEQUEUE(Q) .
This can be implemented using data structures such as
2)Singly linked list
3)Doubly linked list