fork download
  1. #include<stdio.h>
  2. void swap(int*x,int*y){
  3. int t=*x;*x=*y;*y=t;
  4. }
  5. int main(){
  6. int x=100,y=200;
  7. swap(&x,&y);
  8. printf("x=%d,y=%d\n",x,y);
  9. return 0;
  10. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
x=200,y=100