Check out example codes for "how to print a 2d array in c++". It will help you in understanding the concepts better.

Code Example 1

for (int i = 0; i < m; i++)  {     for (int j = 0; j < n; j++)     {        cout << arr[i][j] << " ";     }           // Newline for new row     cout << endl;  }

Learn ReactJs, React Native from akashmittal.com