#include<stdio.h>
int main(){
int arr[2][3]={{1,2,3},{4,5,6}};
// int arr[][]={1,2,3,4,5,6}; this way also is OK!
printf("%d\n",arr[1][2]);
int (*p)[2][3]=&arr;
// int a=arr[1][0];
// arr[1][0]=10;
printf("%d\n",arr[1][0]);
// (*p)[1][0]=10;
printf("%d\n",(*p)[1][0]);
}//这样修改才可以验证数组的数传给了指针数组 |
|