+ 2
why was my quiz declined?
so my quiz was: int a[] = {1,2,3,4,5}; int *ptr = a; cout<<3[ptr]; output : option A - error option B - 4 answer - option B - 4
3 Answers
+ 11
The 3[ptr] notation is tricky and tricky questions are getting declined. I submitted 10 questions in Java and 6 of them are declined.
+ 5
It is a good question. It may discover to a challenger the nature of C-language arrays. This could be useful for those who started programming from higher-level languages like Java.
But "int *ptr = a;" is overloading. Just "cout << 3[a];" would be enough. Be laconic. And give more options. It is easy to guess only from 2 ones.
+ 2
i see. :) i believed thought provoking questions were a good idea. my bad.