fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int n;
  5. int m;
  6. printf(" before swapping n=%d\n m=%d",n,m);
  7. scanf("%d %d",&n,&m);
  8.  
  9. int temp=n;
  10. n=m;
  11. m= temp;
  12.  
  13. printf(" after swapping n=%d \n m=%d",n,m);
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 5320KB
stdin
2
3
stdout
 before swapping n=462030896
 m=32765 after swapping n=3 
 m=2