Two Dimensional Arrays

It is also possible to declare arrays with two or more dimensions. A two dimensional array is also called a matrix. Such a matrix of a table can be stored in a two dimensional array.
The two dimensional array can be declared as follows:
type array_name[row_size][col_size];
The elements in a two dimensional array are stored row wise. Each dimension of the array is indexed from 0 onword to its maximum size minus one. The first index select the row and the second index selects the column.

No comments:

Post a Comment