For the purposes of two dimensional arrays, the "rows" and "columns" are declared, in a sense, by the user; depending on which one he or she calls first. For instance, you can do
for(i = 0; i < 9; i++)
for(j = 0; j < 9; j++) {
grid[i][j]=x;
x++;
}
//or
for(j = 0; j < 9; j++)
for(i = 0; i < 9; i++) {
grid[i][j]=0;
x++;
}
both loops will give the same output if called in the same way as they are declared(i first or j first). That being said, he needs to check for both rows and columns for his program