fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. int a = 5, b = 10, temp;
  5.  
  6. // Swapping values of a and b
  7. temp = a;
  8. a = b;
  9. b = temp;
  10. printf("a = %d, b = %d\n", a, b);
  11. return 0;
  12. }
Success #stdin #stdout 0.01s 5300KB
stdin
f
stdout
a = 10, b = 5