fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int x = 30, z = 20; // Assume address of x is 0x500
  6. int* y;
  7. y = &x;
  8. cout << x << "," << y << "," << z << endl;
  9. x++;
  10. *++y;
  11. cout << x << "," << y << "," << z;
  12. return 0;
  13. }
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
30,0x7ffcf07fde94,20
31,0x7ffcf07fde98,20