fork download
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int *p = new int();
  6. *p=10;
  7. cout<<p<<endl;
  8. cout<<*p<<endl;
  9. int a=15;
  10. int b=a;
  11. p=&a;
  12. cout<<*p<<endl;
  13. *p = 35;
  14. cout<<a<<endl;
  15. cout<<b<<endl;
  16. return 0;
  17. }
Success #stdin #stdout 0s 3476KB
stdin
Standard input is empty
stdout
0x8586008
10
15
35
15