Arrays
An ordinary variable can assign
only one value at a time. The variable used with the object cin within a
repeated statement (while, do while, for) can assign or can take a list of
values however this list of values can’t be used outside the loop. These
limitations or drawbacks can be eliminated by using arrays.
An
array is a set of same data item. An array name can be written with 1 or more
subscript or indices. An array name with one subscript is known as 1
dimensional array, an array name with two subscript is known as 2 dimensional
array and so on.
No comments:
Post a Comment