Multidimensional Array

Multidimensional array is also known as rectangular arrays. It can be two dimensional or three dimensional. The data is stored in tabular form (row, column) which is also known as matrix. To create multidimensional array, we need to use [][] after array name.
Before studying Multidimensional array, we need to be clear with one dimensional array. Below we are telling the system to create new array memory space of given rows and columns.

CODE

EG 1 . Creating 2 dimensional array with 2 rows and 3 coloumns to store name of cricket players.

#include <iostream>
using namespace std;
int main() {
    string cricketPlayers[2][3];
    cricketPlayers[0][0] = "Sachin";
    cricketPlayers[0][1] = "Ramesh";
    cricketPlayers[0][2] = "Tendulkar";
    cricketPlayers[1][0] = "Mahendra";
    cricketPlayers[1][1] = "Singh";
    cricketPlayers[1][2] = "Dhoni";
}

Memory allocation in multi dimensional array (2 dimensional array)
(Click Here, For more exercises)