Array is a collection of same type of elements but in many real life application we may need to group different types of logically related data.For example if we want to create a record of a person that contains name,age and height of that person,then we can't use array because all the three data elements are of different types.
To store different data types we can use a structure which is capable of storing heterogeneous data.Data of different types can be grouped together under single name using structure.The data elements of a structure are referred to as members.
No comments:
Post a Comment