1)Data Object:
Is the container for the data values.
>It is of following
types:
>Integer : It is used to store integer numbers
>Float :It is used to store real numbers
>Character :It stores Unicode character set
>Pointer:These
data objects store the address of other data object; that means the
it stores the memory locations to which these data objects
are bound.
fig(a): shows an integer type data object that hold the value 27 and
is bound to variable name “val”,and located at address “xxxx”
of physical memory.
'C'
implementation: int val = 27;/*By this statement fig(a) is
implemented */
fig(b):shows an
integer pointer type data object that hold the value “xxxx”(i.e.
Address of val w.r.t fig(a) ) and is bound to variable
name “ptr”,and located at address “mmmm” of physical
memory.
'C'
implementation: int* ptr = &val;
/*By this
statement fig(b) is implemented */
/*'&'
ampersand is address of operator i.e. it gives the address of data
object */
/* ' int* ' we
declare a pointer type variable like this in C,by just placing an
asterisk after type name*/
2)Structured
Data object:The discussed
data object are atomic in nature that is they cannot be broken
down,but can be use to build up structures.
Therefore we can say that structured data objects are such data
object that are composed of elementary data object.
It can be classified into two types:
- System Defined:”these are created during housekeeping task of the computer”.eg. Call Stacks.
- User Defined:”For the case of data structure we are generally concerned about this type ”
Classification
- Homogeneous:”The components of the data structured data object is of same type ”
- Heterogeneous: “The components of the data structure are built of elementary data objects”
Note:In 'C' we use struct keyword for creation of structured data
objects.
0 comments:
Post a Comment