/*
指针与二维数组
wky
*/
#include <stdio.h>
int main(){
//二维指针数组
int a =1,b=2,c=3,d=4,e=5,f=6;
int *p[2][3] = {{&a,&b,&c},{&d,&e,&f}} ;//六个指针
//一维数组 *p[] =
printf("p = %d\n",*p[0][0]);
printf("p = %d,P+1 = %d\n",***p,***(p+1));//**应该是数组行地址
//指针二维数组
int a1[2][3] ={{2,3,4},{5,6,7}};
int (*ab)[2][3] = &a1;
(*ab)[0][0] = 999; //ab = a1 的地址 *ab = a1
printf("ab = %p,a1 = %p\n",ab[0][0],&a1[0][0]);
return 0;
}
***p 可以代表二维数组*p[0][0] |
|