指针问题,求解答
int a[2][3],(*p)[3]=a;求大神指点
#include <stdio.h> int main(void) { int i, j; int a[][3] = {{ -1, 1}, {2, 10, 4}, {5}, 6, 7, 8, {9}, 11, 3}; int (*pa)[3] = a; int *pb = (int*)pa; for(i = 0; i < 6; i++) { for(j = 0; j < 3; j++) { printf("%2d ", pa[i][j]); if((j + 1) % 3 == 0) { printf("\n"); } } } printf("\n\n"); for(i = 1; i < 5; i++) { for(j = 0; j < 2; j++) { printf("%2d ", *(pb + 3 * i + j)); if((j + 1) % 2 == 0) { printf("\n"); } } } return 0; }