Differences Between Structures and Arrays?
https://www.computersprofessor.com/2016/12/differences-between-structures-and.html
|
|
ARRAY
|
|
STRUCTURE
|
A)
|
An array is a collection of
related data elements Of same type.
|
A)
|
Structure can have element s of
Different type.
|
B)
|
An array is derived data
|
B)
|
A structure is a programmer
defined
one
|
C)
|
Any array behaves like a built in
data type. All we have to do is to declare an array variable and
use it.
|
C)
|
But in the case of a structure,
Ist we
have to design and declare a
data structure. Before the variables
of that type are declared and used.
|
|