Programming Languages C Objective
Mar 08, 2013

What will be output of the following c code?

void main()
 {
 int array[2][2][3]={0,1,2,3,4,5,6,7,8,9,10,11};
 printf("%d",array[1][0][2]);
}

Choose the correct answer:
A) 4
B) 8
C) 3
D) 6
Detailed Explanation

array[1][0][2] means 1*(2*3)+0*(3)+3=9th element of array starting from zero i.e. 8.

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback