*/
#include <stdio.h>
int main(){
int a[3][4]={1,3,5,7,8,4,99,34,2,56,334,34};
//列指针
printf("%d\t%d\t%d\t%d\n",*a[0],*(a[0]+1),*(a[0]+2),*(a[0]+3));
// 1 3 5 7
printf("%d\t%p\t%p\t%p\n",**a,(a+1),*(a+2),&a[2][0]);
// 1 0x7fff56135bf0 0x7fff56135c00 0x7fff56135c00
printf("%d\n",**a);//1
int (*p)[4]=a;//定义二级指针
for (int i=0;i<3;i++) {
for (int j=0;j<4;j++) {
printf("%d\t",*(*(p+i)+j));//二级指针遍历
}
printf("\n");
}
}
|
|