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 5284KB
stdin
4
5
stdout
 before swapping n=-742372672
 m=32764 after swapping n=5 
 m=4