answersLogoWhite

0

Differences between structure and array

Updated: 8/16/2019
User Avatar

Wiki User

13y ago

Best Answer

The primary difference is that an array is a homogeneous datatype, meaning that it can hold data of a single type only (integer, floating-point, character etc.) .

A structure on the other hand, is a heterogeneous datatype, thus it can hold data of more than one type.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

Array:- " Array is anordered collection of homogenous types of data elements".

hence it means data is stored at continous memory location.

e.g:- int or float or char etc.

Structure:-

" structure is a collection of hetrogeneous types of element"

hence differents element int,float,char etc.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Differences between structure and array
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the difference between an array of structures and an array within a structure?

The main differences between an array and a structure are: An Array is a collection of similar data items.An array is derived data type.It behave like a built in data type. An array can be increased or decreased. A structure is a collection of dissimilar data items.It is a user defined data types.It must be declared and defined.A structure element can be added if necessary.


What is the difference between an array and structure?

An array is a collection of related data elements of same type.Structure can have elements of different types.An array is a derived data type.A structure is a programmer-defined data type.A struct can contain multiple data types, whereas an array can not.


What are the differences between Homogeneous and non homogeneous data structures?

in homogeneous data structure all the elements of same data types known as homogeneous data structure. example:- array while there can b any type of data in non homogeneous data structure. example:- list


What is difference between structure and array?

An array is a made up of elements of the same type e.g. strings or integers. A structure on the other hand can be made up of elements of different types.


What are the differences between broadside array and endfire array?

in received antenna: broadside means the direction of arrival is 90 degree or wave perpendicularly impinges the array. and endfire means the wave comes from the direction along the array axis.


Why array is differ from structure?

An array is an aggregate of the same type. A structure is an aggregate of different types.


What are the differences between structure and classes?

One of the differences between structure and classes socially is that structure is the organization of society, and classes are the stratification within that society. Think of it like a closet, and the different styles of clothes within the closet.


Is there any overhead issues if you make a 2D array arr28 rather than making a 1D array arr16 of size 16 Any memory issues or execution differences between the two?

2D array of size 2x8 and 1D array of size 16


Is array is structure or not?

Array is not a struct. Array only has one datatype, struct has arbitrary different datatypes.


What is meant by array with in structure in c language?

It means a structure has a member that is an array: typedef struct foo { int x[42]; // an array of 42 integers // other members... };


What distinguishes an array from a structure?

Am array is an aggregate of elements that must be of the same type. A structure is an aggregate of elements (members) that can be of different types.


What are differences between natural and manufactured structure?

A natural structure is formed entirely by nature, whilst a building, bridge, etc. is a manufactured structure.