For instance:
void display (int *p, int size0, int size1)
{
int i, j;
for (i = 0; i < size0; i++)
for (j = 0; j< size1; j++, p++)
printf("%-5d \n", *p );
}
int main()
{
int a[2][5] = {{3, 8, 7, 6, 10}, {6, 16, 14, 12, 20}};
display((int *)a, 2, 5);
}
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke