#include <stdio.h>
int main(void)
{
int a[3][2]={{0,1},{2,3},{4,5}};
int b[3][2]={(0,1),(2,3),(4,5)};
int *p;
int *p1;
p=a[0];
p1=b[0];
printf("%d\n",p[0]);
printf("%d\n",p1[0]);
return 0;
}
输出结果为:
多维数组初始化时,如果将{}大括号写成()小括号,那么多维数组将(0,1),(2,3),(4,5)解释为{1,3,5}