fork(3) download
  1. #include <iostream>
  2.  
  3. void swap(int& a, int &b) {
  4. a ^= b; // a = a ^ b;
  5. b ^= a; // b = a ^ b;
  6. a ^= b; // a = a ^ b;
  7. }
  8.  
  9. int main() {
  10. // your code goes here
  11.  
  12. int a = 88;
  13. int b = 14;
  14.  
  15. swap(a, b);
  16.  
  17. std::cout << a << b;
  18.  
  19. return 0;
  20. }
Success #stdin #stdout 0s 3460KB
stdin
Standard input is empty
stdout
1488