GATE Computer Science (CS) 2020 Solved Papers

© examsiri.com
Question : 44 of 65
 
Marks: +1, -0
Consider the following C functions.
int fun1 (int n)
{
static int i = 0;
if (n > 0) {
++i;
fun1 (n–1);
}
return (i);
}

int fun2 (int n)
{
static int i = 0
if (n > 0) {
i = i + fun1 (fun2 (n–1));
}
return (i);
}

The return value of fun2(5) is _______.
  • Your Answer:
Go to Question: