#include<stdio.h> void main() {int a[5]={3,5,7,8,9}; int (*p)[5]; p=&a; printf("%d",(*p)[2]);//7 }
#include<stdio.h> void main() {int a[5]={1,5,3,8,9}; int *p; p=&a[0];//或者p=a; printf("%d",p[4]);//9 }
#include<stdio.h> void main() {int a[3][2]={1,5,3,8,9,6}; int (*p)[2]; p=a; printf("%d",p[1][1]);//8 printf("%d",*(*(p+1)+1));//8 }
#include<stdio.h> void main() {int a[3][2]={1,5,3,8,9,6}; int *p; p=a[0]; //p=&a[0][0]; printf("%d",*(p+5));//6 printf("%d",*(p+2));//3 }