The C++ language permits declaration and initialization of multidimensional arrays. The syntax of a multidi-
mensional array is as follows:
arrayname[S1][S2][S3]...[Sn]
where Si is the size of the i
th
dimensions
Example: A three-dimensional array can be initialized as follows:
int mat[3][3][3] =
{
1,2,3,
4,5,6,
7,8,9,
1,4,7,
2,5,8,
3,6,9,
1,4,4,
2,4,7,
8,8,5
};
The program given in Example 13.5 supports multidimensional arrays.
Write a program to display the elements of a multidimensional ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.