fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int x = 5;
  7. int y = 10;
  8. int* b = &x;
  9. int* c = &y;
  10. int d = *b;
  11. int arr[5];
  12. arr[0] = 7;
  13. cout << b << ' ' << c << ' ' << d << "\n";
  14. b++;
  15. int e = *b;
  16. cout << b << ' ' << e << "\n";
  17. b++;
  18. e = *b;
  19. cout << b << ' ' << e << "\n";
  20. int* f = &arr[0];
  21. cout << f << " " << &f << "\n";
  22. return 0;
  23. }
Success #stdin #stdout 0s 5304KB
stdin
Standard input is empty
stdout
0x7ffc9a9049cc 0x7ffc9a9049dc 5
0x7ffc9a9049d0 1680505632
0x7ffc9a9049d4 5229
0x7ffc9a9049e0 0x7ffc9a9049d0