fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a[] = {1, 10, 100}, i = 2;
  6. cout << a[i] << "\n" << i[a];
  7. return 0;
  8. }
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
100
100