Consider the following C function: int f(int n) { static int i = 1; if(n >= 5)…
PYQ GATE 2004
Consider the following C function:
int f(int n)
{
static int i = 1;
if(n >= 5) return n;
n = n+i;
i++;
return f(n);
}The value returned by f(1) is
- A.
5
- B.
6
- C.
7
- D.
8
Attempted by 916 students.
Sign up free to check your answer
Sign up freeLoading lesson…

