fork download
  1. #include <stdio.h>
  2.  
  3. void sort(int *x,int *y){
  4. if(*x<*y){
  5. int w;
  6. w=*x;
  7. *x=*y;
  8. *y=w;
  9. }
  10. }
  11.  
  12. int main(void){
  13. int x=5;
  14. int y=7;
  15.  
  16. sort(&x,&y);
  17.  
  18. printf("%d,%d",x,y);
  19.  
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
7,5