#include<iostream>
usingnamespace std;
int main()
{
int matrix[2][3], row, col, maxrows = 2, maxcols = 3;
// get values for the matrix
for (row = 0; row < maxrows; row++)
{
for (col = 0; col < maxcols; col++)
{
cout << "Please enter a value for position[" << row << "," << col << "]";
cin >> matrix[row][col];
}
}
// Display The values of matrix
cout << "The values entered for the matrix are:" << endl;
for (row = 0; row < maxrows; row++)
{
for (col = 0; col < maxcols; col++)
{
cout << "\t" << matrix[row][col];
}
cout << endl;
}
}
my question is is pretty stupid but it confused me so i just thought to ask it here the line cin >> matrix[row][col]; is it reading the values in row and column on each repetition of the inner loop one by one or that the values just going to matrix array with the size of 2 and 3.