代码
#include <stdio.h>
void swap(int *a, int *b)
{
int temp;
temp = *a;
*a = *b;
*b = temp;
}
int main()
{
int x, y;
int *p = &x, *q = &y;
scanf("%d", &x);
scanf("%d", &y);
swap(p, q);
printf("%d %d\n", x, y);
return 0;
}