What Is The Difference Between Array And Structure?


2 Answers

Rajat Dhande Profile
Rajat Dhande answered

Structure is a collection of heterogeneous data type but array is a collection of homogeneous data types.

1-It is a collection of data items of same data type.

2-It has declaration only

3-.There is no keyword.

4- array name represent the address of the starting element.

1-It is a collection of data items of different data type.

2- It has declaration and definition

3- keyword struct is used

4-Structure name is known as tag it is the short hand notation of the declaration.

for more info in visit this site

Anonymous Profile
Anonymous answered
The main diffs b/n array n structure is ..
Array is derived data type structure is user-defined data type
arrays contains set of related items structures contains set of diff data types
uses subscripts to access elements uses Dot operator to access elements
static memory allocation dynamic memory allocation

Answer Question