代码
#include <stdio.h>void Test(double (*a)[3])
{printf("sizeof(a)=%d\n", sizeof(a));printf("sizeof(*a)=%d\n", sizeof(*a));printf("sizeof(a[1])=%d\n", sizeof(a[1]));
}void main()
{double ar[2][3] = { {1.0,2.1,3.2},{4.3,5.4,6.5} };double (*p)[3] = ar; //行指针int i = 0;while (i < sizeof(ar) / sizeof(ar[0])) // =48/24=2 行{++p; //行指针++i;}Test(ar);
}
运行结果