首页 > 代码库 > 指针的误区

指针的误区

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

 

 

指针的误区