fork download
  1. #include <stdio.h>
  2. void Swap(int a, int b);
  3. int main(void)
  4. {
  5. int a, b;
  6. printf("Input a, b:");
  7. scanf("%d,%d", &a, &b);
  8. printf("Befor Swap():a = %d, b = %d\n", a, b);
  9. Swap(a, b);
  10. printf("Befor Swap():a = %d, b = %d\n", a, b);
  11. return 0;
  12. }
  13. void Swap(int a, int b)
  14. {
  15. int temp;
  16. temp = a;
  17. a = b;
  18. b = temp;
  19. return a,b;
  20. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
Input a, b:Befor Swap():a = -1918771072, b = 32766
Befor Swap():a = -1918771072, b = 32766