Consider the following C functions:
The return value of
c
fun2(5) is ________.Programming in CFunctions, Parameter Passing, Scope Rules, RecursionNAT2 marksMedium
1int fun1(int n) {
2 static int i = 0;
3 if (n > 0) {
4 ++i;
5 fun1(n - 1);
6 }
7 return(i);
8}
9int fun2(int n) {
10 static int i = 0;
11 if (n > 0) {
12 i = i + fun1(n);
13 fun2(n - 1);
14 }
15 return(i);
16}
17fun2(5) is ________.A GATE question every morning
One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.