C. RECURSION
FE-RECURSION-04 In a non-void recursive function, once the base case is reached, a value is returned to the caller. Given the code below, what will be the value returned to the 3rd recursive call? If the program results to an infinite recursion, write INFINITE RECURSION as your answer. 1 #include <stdio.h> 2 3 int f(int n) 48{ 5 65 11} 14 15 16 17 18 19 if (n > 0) { else return n + f(n - 2); return 0; int main() { int n; n = 10; printf("%d", f(n)); return 0;
C. RECURSION
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am