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