fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int x=45;
  6. // cout << sizeof(x)<< endl;
  7. // cout << &x <<" "<<sizeof(&x)<< endl;
  8. // ++x;
  9. // cout <<x <<" "<< &x+1 <<" "<<sizeof(&x)<< endl;
  10. for(int i=0; i<10; i++)
  11. {
  12. cout <<x++ <<" "<< &x+i << endl;
  13. }
  14. return 0;
  15. }
Success #stdin #stdout 0s 4400KB
stdin
Standard input is empty
stdout
45 0x7fff94da6384
46 0x7fff94da6388
47 0x7fff94da638c
48 0x7fff94da6390
49 0x7fff94da6394
50 0x7fff94da6398
51 0x7fff94da639c
52 0x7fff94da63a0
53 0x7fff94da63a4
54 0x7fff94da63a8