#include<stdio.h> int main() { int a =15, b = 99, c = 222; int *p = &a; printf("%d %d ",a,*p); *p = b; //此时把p指向的地址存放的a的值已经被b的值重新覆盖,a=b: printf("%d %d ",a,*p); c = *p; printf("%d %d %d %d ",a,b,c,*p); return 0; }
#include<stdio.h> int main() { int a =15, b = 99, c = 222; int *p = &a; printf("%d %d ",a,*p); *p = b; //此时把p指向的地址存放的a的值已经被b的值重新覆盖,a=b: printf("%d %d ",a,*p); c = *p; printf("%d %d %d %d ",a,b,c,*p); return 0; }