MULTI - DIMENSIONAL ARRAYS


MULTI - DIMENSIONAL ARRAYS



C allows arrays of three or more dimensions. The general form of a multi-dimensional array is type                     array_name[s1][s2][s3] .......... [sm];

                  where si is the size of the ith dimension. Some example are:

                                   int survery[3][5][12];
                   and       float table[5][4][5][3];

survey is a three-dimensional array declared to contain 180 integer type  elements. Similarly table is a four-dimensional array containing 300 elements of floating-point type. The array survey may represent a survey

data of rainfall during the last three years from January to December in five cities.

Comments