fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int mas [10] = {1, 3, 7, 5, 8, 2, 7};
  6. int * p1;
  7. for(int i=0;i<10;i++)
  8. {
  9. p1 = & mas [i];
  10. cout<<mas[i]<<" "<<p1<<endl;
  11. }
  12. return 0;
  13. }
  14.  
Success #stdin #stdout 0.01s 5328KB
stdin
Standard input is empty
stdout
1 0x7ffe0747b8d0
3 0x7ffe0747b8d4
7 0x7ffe0747b8d8
5 0x7ffe0747b8dc
8 0x7ffe0747b8e0
2 0x7ffe0747b8e4
7 0x7ffe0747b8e8
0 0x7ffe0747b8ec
0 0x7ffe0747b8f0
0 0x7ffe0747b8f4