#include <stdio.h>
void swap(int *a,int *b);
int main() {
int a,b;
a=3;
b=5;
printf("%d,%d\n",a,b);
swap(&a,&b);
printf("%d,%d\n",a,b);
return 0;
}
void swap(int *a,int *b){
int w=*a;
*a=*b;
*b=w;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIHN3YXAoaW50ICphLGludCAqYik7CgppbnQgbWFpbigpIHsKCWludCBhLGI7CglhPTM7CgliPTU7CglwcmludGYoIiVkLCVkXG4iLGEsYik7Cglzd2FwKCZhLCZiKTsKCXByaW50ZigiJWQsJWRcbiIsYSxiKTsKCXJldHVybiAwOwp9Cgp2b2lkIHN3YXAoaW50ICphLGludCAqYil7CgkJaW50IHc9KmE7CgkJICAgKmE9KmI7CgkJICAgKmI9dzsKCX0=