main(){ double a, b; char* c, d; a = 1.3; b = 2.5; c=malloc(1); d=malloc(1); printf("Por ahora valen a = %lf , b = %lf\n", a, b); swap((long*)&a,(long*)&b); printf("ahora valen a = %lf , b = %lf\n", a, b); printf("Por ahora valen c = %p , d = %p\n", c, d); swap((long*)&c,(long*)&d); printf("ahora valen c = %p , d = %p\n", c, d); } swap(a,b) long *a,*b; { (*a) ^= (*b); (*b) ^= (*a); (*a) ^= (*b); }