Home / Questions / What are the differences between structures and arrays?
Explanatory Question

What are the differences between structures and arrays?

👁 1,930 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

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

Array

  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 represents the address of the starting element.

 

Structure

  1. It is a collection of data items of different data type.
  2. It has declaration and definition
  3. keyword struct is used the
  4. Structure name is known as tag it is the short hand notation of the declaration.