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