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