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