What will be the output of the following program? (MCQ) #include <stdio.h> int…
What will be the output of the following program? (MCQ)
#include <stdio.h>
int main() {
register int i;
int arr[2];
arr[0] = 10;
arr[1] = 20;
for (i = 0; i < 2; i++) {
printf("arr[%d] = %d \n", i, arr[i]);
}
return 0;
}
- A.
Array index out of bound error
- B.
none of these
- C.
arr[0] = 10
arr[1] = 20
- D.
Syntax error
Attempted by 563 students.
Sign up free to check your answer
Sign up freeLoading lesson…

