C concepts on arrays
arrays, c, output
Solution
You are correct, the code is wrong. Likely, it is a typo, and the intent was either to define `i` or to use `1[arr]`.
Problem
``` int main(){ int arr[2]={30,40}; printf("%dn",i[arr]); return 0; } ``` I found this question in an examination and the given solution is 40 But I think it should give an error since i is undefined. Or, may be I am missing something. Please explain me how 40 is the correct answer? Thanks in advance.