Array

The problem with the simple data type is it can only save one value at a time, suppose we want to save the roll number of the all students of a class  then we have to take large number of different variables as number of student. It will be very complex and wastage of time. The better way is make an array of students. By using array we can save the multiple values in the same name variable. But the location will be different for all values of the array. And the data type must be same for the all elements of a particular array.

The arrays can be classified into two categories:

  1. One dimensional

  2. Two dimensional or multi dimensional

Leave a Reply

Your email address will not be published. Required fields are marked *