fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int a[] = {31337, 0, 1, 2, 3, 4, 5};
  7. int *b = a + 5;
  8. int c = b[-5];
  9. int d = (-5)[b];
  10.  
  11. cout << "c=" << c << ", d=" << d << endl;
  12.  
  13. return 0;
  14. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
c=31337, d=31337