关于指针地址的问题
程序代码:
#include<stdio.h> int main() { int a = 0,b = 1,p; int *pa = &a,*pb = &b; p = *pa; *pa = *pb; *pa = p; printf("a = %d,&a = %p,pa = %p,*pa = %d\n",a,&a,pa,*pa); printf("b = %d,&b = %p,pb = %p,*pb = %d\n",b,&b,pb,*pb); return 0; }
这个是代码,我把带颜色的去掉后两个地址变了,但是不是互换,为啥啊....求解释..