fork download
  1. #include <iostream>
  2. #include <typeinfo>
  3.  
  4. using namespace std;
  5.  
  6. int c=1,d=2;
  7. int& a=c, b=d;
  8.  
  9. int main() {
  10. register auto tmp = a;
  11. a=b;
  12. b=tmp;
  13. cout
  14. <<a<<" "<<b<<endl
  15. <<typeid(tmp).name();
  16. return 0;
  17. }
Success #stdin #stdout 0s 2884KB
stdin
Standard input is empty
stdout
2 1
i