179
C++ Multidimensional Arrays
The multidimensional array is also known as rectangular arrays in C++. It can be two dimensional or three dimensional. The data is stored in tabular form (row ∗ column) which is also known as matrix.
C++ Multidimensional Array Example
Let’s see a simple example of multidimensional array in C++ which declares, initializes and traverse two dimensional arrays.
Output:
5 10 0 0 15 20 30 0 10
C++ Multidimensional Array Example: Declaration and initialization at same time
Let’s see a simple example of multidimensional array which initializes array at the time of declaration.
Output:”
2 5 5 4 0 3 9 1 8
Next TopicC++ Pointers