Multi Dimensional arrays


Multi Dimensional arrays


Multi Dimensional arrays
C allows arrays of three or more dimensions. The exact limit is determined by the compiler.
The general form of multi-dimensional array is type array-name[s1][s2][s3]----------------------[sm];
 where si is the size of the ith dimension.
Some examples are:
        int survey [3][5][12];
        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

No comments:

Post a Comment