Let us trace the execution of fun1(5) step by step:
fun1(5):
Calls fun2(5 - 2) = fun2(3)
fun2(3):
++n increments local n from 3 to 4, then calls fun1(4)
fun1(4):
Calls fun2(4 - 2) = fun2(2)
fun2(2):
++n increments local n from 2 to 3, then calls fun1(3)
fun1(3):
Calls fun2(3 - 2) = fun2(1)
fun2(1):
++n increments local n from 1 to 2, then calls fun1(2)
fun1(2):
Calls fun2(2 - 2) = fun2(0), which returns immediately because of the base condition n == 0
Back in fun2(1):
Prints n (which was incremented to 2)
Back in fun2(2):
Prints n (which was incremented to 3)
Back in fun2(3):
Prints n (which was incremented to 4)
Concatenating all printed numbers in chronological order gives:
5 3 4 2 3 1 2 2 2 3 3 4 4 5→53423122233445.
Thus, option (A) is correct.