#include<stdio.h>
int main()
{
int a=10;
int *p;
p=&a;
printf("变化前p中存储的地址%p\n",p);
printf("变化前p自身的地址%p\n",&p);
printf("*p的数值是%d\n",*p);
printf("a的数值是%d\n",a);
printf("-----------\n");
int b=0;
p=&b;
printf("变化后p中存储的地址%p\n",p);
printf("变化后p自身的地址%p\n",&p);
printf("*p的数值是%d\n",*p);
printf("b的数值是%d\n",b);
printf("-----------\n");
return 0;
} |
|