Q. What will be the output of the following C program?
Code:#include <stdio.h>
int main()
{
int x[5] = { 10, 20, 30 };
printf("%d", x[3]);
return 0;
}
β
Correct Answer: (A)
0
Explanation: In C language, when an array is partially initialized at the time of declaration then the remaining elements of the array is initialized to 0 by default.