fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. const int value = 10;
  6. int* p = (int*)&value;
  7. *p = 20;
  8.  
  9. cout << value << " " << *p << endl
  10. << &value << " " << p << endl;
  11.  
  12. return 0;
  13. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
10 20
0xbfeb3edc 0xbfeb3edc