rows and columns would be somthing you have acheived with the placment of data in the arrays,
and the way in which that data is accessed. As vart is saying, there really is no rows or columns
if you were to look at this in memory it would just be 1 "column". You specify by the algorithms you use, what represents a row and what represents a column.
for example
Code:
#include <stdio.h>
int main(void)
{
int i, j;
int ary[3][5] = { {1, 2, 3, 4, 5},
{1, 2, 3, 4, 5},
{1, 2, 3, 4, 5} };
for (i = 0; i < 3; i++)
{
for (j = 0; j < 5; j++)
printf("%d ", ary[i][j]);
printf("\n");
}
for (i = 0; i < 5; i++)
{
for (j = 0; j < 3; j++)
printf("%d ", ary[j][i]);
printf("\n");
}
return 0;
}
output:
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
1 1 1
2 2 2
3 3 3
4 4 4
5 5 5
so which for loop is representing data in the correct row/column's? That depends on what way other code in the program, uses and "sees" the data. It could be either, its up to you, it just has to be consistant