Array Structure
Array is collection of homogeneous data.
Structure is the collection of heterogeneous
data.
Array data are access using index.
Structure elements are access using .
operator.
Array allocates static memory.
Structures allocate dynamic memory.
Array element access takes less time than
structures.
Any array behaves like a built-in data
types. All we have to do is to declare an
array variable and use it.
Structure elements takes more time than
Array.
An array is a derived data type .
structure, first we have to design and
declare a data structure before the variable
of that type are declared and used.
Memory (array size) is fixed
A structure is a programmer-defined data
type
7.
Adding/deleting an element in the array
is comparatively
Memory (structure size) can be
changed dynamically
4
5
difficult since the data already present in Adding/deleting takes less time than in
the array needs
arrays
to be moved