fork download
  1. #include <iostream>
  2. using namespace std;
  3. int main(){
  4. int a = 8;
  5. int b = 3;
  6. cout << a << ", " << b << endl;
  7. (&b)[1] = a; // dont ever do this irl
  8. a = b;
  9. b = (&b)[1];
  10. cout << a << ", " << b << endl;
  11. }
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
8, 3
3, 8