#include <stdio.h>
void ex(int *m, int *n);
int main () {
int *p1, *p2;
int a = 7, b = 1;
p1=&a;
p2=&b;
printf ("p1=%p p2=%p\n", p1, p2);
ex(p1,p2);
printf ("p1=%p p2=%p\n", p1, p2);
}
void ex(int *m, int *n) {
int *t;
t = m;
m = n;
n = t;
}
为什么这样做之后,p1指针还是指向a,而不是指向b?