fork download
  1. #include <stdio.h>
  2. void swap(int x,int *y);
  3. int main(void) {
  4. int a=1;
  5. int b=2;
  6. swap(a,&b);
  7. printf("%d%d",a,b);
  8. return 0;
  9. }
  10. void swap(int x,int *y){
  11. int temp;
  12. temp=x;
  13. x=*y;
  14. *y=temp;
  15. }
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
11