fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int index = 1;
  8.  
  9. for(int i = 1; i < 2; ++i)
  10. {
  11. for(int j = 1; j < 2; ++j)
  12. {
  13. int tmp = index, &index = tmp;
  14.  
  15. cout << index << endl;
  16. }
  17. ++index;
  18. }
  19.  
  20. cout << index << endl;
  21.  
  22. return 0;
  23. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
1
2