#include"stdio.h"
main()
{
int i = 3, j = 4;
int m[3][4] = {{1,2,3,4}, {4,5,6,7}, {8,9,10,11}};
int (*p)[4];
int f(int *a, int b, int c);
p = m;
f( *p, i, j);
return 0;
}
int f(int *a, int b, int c)
{
int x, y;
for(x = 0; x < b; x++)
{
for(y = 0; y < c;y++ )
{
printf("%-3d",*a++);
}
printf("\n");
}
return 0;
}
/* 输出:
1
2
3
4
4
5
6
7
8
9 10 11
Press any key to continue*/