二级模拟题 找大佬看看
若有定义语句:inta[2][3],*p[3];
则以下语句中正确的是 (c)
A p=a;
B p[0]=a;
C p[0]=&a[1][2];
D p[1]=&a;
b选项哪里错了
#include <stdio.h> int main(int argc, char **argv){ int a[2][3] = {{11,12,13},{21,22,23}}; int *p[3]; p[0] = a; //test1.c:7:10: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types] printf("a=%p,p=%p.\n",a,p); return 0; }