fork(1) download
  1. #include <iostream>
  2. #include <stdio.h>
  3. #include <errno.h>
  4. #include <string.h>
  5. #include <stdlib.h>
  6. using namespace std;
  7.  
  8. int main() {
  9. int a=3, b=5;
  10. a^=b^=a^=b;
  11. cout<<a<<endl<<b;
  12.  
  13. printf("\na=%d",a);
  14. printf("\nb=%d",b);
  15.  
  16. return 0;
  17. }
Success #stdin #stdout 0s 3140KB
stdin
Standard input is empty
stdout
5
3
a=5
b=3