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