Question 16143 – Arrays
November 15, 2023Question 11488 – Arrays
November 15, 2023Arrays
| Question 15 |
What is the output of the following C program?
{ int a|5| = {2,3};
Printf (“/n%d%d%d”, a[2], a[3], a[4]) ;
} | Garbage values | |
| 2 3 3
| |
| 3 2 2 | |
| 0 0 0 |
Question 15 Explanation:
First two elements of array will get the value 2 and 3 and the remaining 3 elements of the array will get the value 0 by default.
Correct Answer: D
Question 15 Explanation:
First two elements of array will get the value 2 and 3 and the remaining 3 elements of the array will get the value 0 by default.
