printing out 2d array code example
Example 1: print 2d array in java
int[][] array = new int[rows][columns];
System.out.println(Arrays.deepToString(array));
Example 2: how to print a 2d array in c++
for (int i = 0; i < m; i++)
{
for (int j = 0; j < n; j++)
{
cout << arr[i][j] << " ";
}
// Newline for new row
cout << endl;
}