C
f(1) is called .
static int i= 1 gets executed only after first func call after the subsequent func calls this line gets is not executed .
if( n>=5) : this condition is false for n= 1
n = n + i // n becomes 2
i++; after this line i becomes 2
return f(2) // f(2) is called
again this condition ( n>= 5 ) becomes false
Now n becomes 2+ 2 = 4
i becomes 3
f(4) is called
again this condition ( n>=5) becomes false
Now n becomes 4+3= 7
i becomes 4
f(7) is called
Now this condition (n>=5) becomes true
return n // 7 gets returned