What will be the output of the following C code? int main() { int data [2][3][2]={0,1,2,3,4,5,6,7,8,9,10,11}; int i=0, j=2, k = 1; printf("%d\n", data [i][j][k]); return 0; }
- A.0
- B.5
- C.6
- D.11
Show answer
Answer: B. 5
data[0][2][1] accesses the 6th element (index 5) of the array, which is 5.