fork download
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5. using std::cout;
  6.  
  7. int i = 2;
  8. int foo[] = {1,2,3};
  9.  
  10. cout << foo[i] << ' ' << i[foo] << '\n';
  11. cout << "Stringliterale sind auch Arrays"[i] << ' ' << i["Wie man sieht"] << '\n';
  12. }
Success #stdin #stdout 0.02s 2680KB
stdin
Standard input is empty
stdout
3 3
r e