fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int y = 2;
  6. int *py = &y;
  7. cout << py << endl;
  8. int x[5] = {0, 5, 6, 7, 8};
  9. int *x1 = x + 1;
  10. int *x2 = x + 3;
  11. int d = x2 - x1;
  12. cout << d;
  13. return 0;
  14. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
0x7ffef65be73c
2