Both fun1 and fun2 maintain their own separate static int i, initialized once to 0.
### Behavior of fun1(n):
fun1(n) increments its static variable i exactly n times during recursive calls when invoked with argument n.
Since i is static and retains its value between function calls:
Before any call, fun1's static i=0.
Calling fun1(k) increments its static i by k and returns the updated total value of i.
### Step-by-step execution of fun2(5):
Let i1 denote the static variable of fun1 and i2 denote the static variable of fun2.
Initially, i1=0 and i2=0.
fun2(5) (n=5):
fun1(5) is called: i1 increases by 5⟹i1=5, returns 5.
i2=i2+fun1(5)=0+5=5.
fun2(4) (n=4):
fun1(4) is called: i1 increases by 4⟹i1=5+4=9, returns 9.
i2=5+9=14.
fun2(3) (n=3):
fun1(3) is called: i1 increases by 3⟹i1=9+3=12, returns 12.
i2=14+12=26.
fun2(2) (n=2):
fun1(2) is called: i1 increases by 2⟹i1=12+2=14, returns 14.
i2=26+14=40.
fun2(1) (n=1):
fun1(1) is called: i1 increases by 1⟹i1=14+1=15, returns 15.
i2=40+15=55.
fun2(0) (n=0):
Condition (n>0) is false. Returns i2=55.
All pending recursive calls unwind and return i2=55.
Thus, the final return value is 55.