|
By definition, an array is a list of variables, all with the same name and data type.
We only need to use one variable,when we work with a single item.
However, if we have a list of items which are of similar type to deal with and then we need to declare an array of variables instead of using a variable for each item.
For example, if we need to enter one hundred names, instead of declaring one hundred different variables, we need to declare only one array and we differentiate each item in the array by using subscript, the index value of each item, for example name(1), name(2),name(3) .......etc.
|