Vidyalelo
C Programming · Q183

Pointer

Programming · C Programming · question 183

Q183

What will be the output of the following C code? #include void main() int a[2][3] = 1, 2, 3, 4, 5; int i = 0, j = 0; for (i = 0; i < 2; i++) for (j = 0; j < 3; j++) printf("%d", a[i][j]);

A.
1 2 3 4 5 0
Answer
B.
1 2 3 4 5 junk
C.
1 2 3 4 5 5
D.
Run time error

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board