Predict the Output: void main() { int arr[10] = { 1, 2, 3, 4, 5 };…
PYQ TCS NQT 2026
Predict the Output:
void main()
{
int arr[10] = { 1, 2, 3, 4, 5 };
printf("%d", arr[5]);
}
Type '50' in the answer if there is compile time or run time error in the above code.
- A.
0
- B.
1
- C.
error
- D.
1 2 3 4 5
Attempted by 1180 students.
Sign up free to check your answer
Sign up freeLoading lesson…

