What is an Array?

What is an Array? And its importance

An array is the collection of similar or homogeneous collection of data. It means an array can contain one type of data only, either all integers, all characters, all floating point. The individual data items are represented by their corresponding array elements (i.e. first data item is represented by first array element, second data item is represented by second array element and so on).

 

Importance of an Array

  • It can represent multiple data items of same type by using a single name.
  • It is not necessary to declare too many variables by using array.
  • It can be used to implement other data structure like stack, queue list, tree etc.
  • Two dimensional arrays can be used to represent data in tabular structure of matrix representation.
Please follow and like us:

Leave a Reply

Your email address will not be published.