#include <stdio.h>
int main() {
int num = 10;
int *p1 = &num//p1存储num的地址
int **p2 = &p1;//p2存储p1的地址
int ***p3 = &p2;//p3存储p2的地址
*p1 = 100;//*p1取出num变量
**p2 = 200;//**p2取出num变量
***p3 = 300;//***p3也是取出num变量
printf("num = %d\n",num);
printf("num = %d\n",***p3);
return 0;
}
指针问题
Copyright © 2017 Powered by LZH, Theme used GitHub CSS.