Consider this corrected C program (with the function call sequenced before the…
PYQ UGC NET 2006Modified — slightly modified from the official paper; see the solution
Consider this corrected C program (with the function call sequenced before the array assignment): int arr[]={1, 2, 3, 4}; int count; int incr(void) { return ++count; } int main(void) { int value = incr(); arr[count++] = value; printf("arr[count]=%d\n", arr[count]); } The value printed by the program is:
- A.
1
- B.
2
- C.
3
- D.
4
Attempted by 26 students.
Sign up free to check your answer
Sign up freeLoading lesson…

