#include <stdio.h> //指针的指针
int main(){ int i; int a[] = {1,2,3,4,5,6,7,8,9}; int* pa = a; int* (*ppa) = &pa; int num = sizeof(a)/sizeof(a[0]);
for(i = 0 ; i<num ; printf("a[%d] is %d \n",i,a[i]),i++);
for(i = 0 ; i<num ; printf("*(a+%d) is %d \n",i,*(a+i)),i++);
for(i = 0 ; i<num ; printf("pa[%d] is %d \n",i,pa[i]),i++);
for(i = 0 ; i<num ; printf("*(pa+%d) is %d \n",i,*(pa+i)),i++);
for(i = 0 ; i<num ; printf("(*ppa)[%d] is %d \n",i,(*ppa)[i]),i++);
for(i = 0 ; i<num ; printf("*((*ppa)+%d) is %d \n",i,*((*ppa)+i)),i++); return 0;
}
|