+ 4
Are negative array indices or 0 sized arrays valid in C++ ?
Why does this code compile and output 0? #include <iostream> using namespace std; int main() { int a[0]; cout << a[-1]; return 0; }
1 Odpowiedź
+ 4
Thanks ~ swim ~. Personally I think they should not have compiler dependent questions in challenge quizzes but unfortunately we have some.