The following C function is an example of what type of recursion? int f(int n)…
BEL · Computer Science · Probationary Engineer · 2023
The following C function is an example of what type of recursion?
int f(int n) { if(n==1) return 1; else if(n==0) return 0; else return(f(n-1)+f(n-2)); }
- A.
Binary
- B.
Tail
- C.
Linear
- D.
Head
Attempted by 701 students.
Show answer
Correct answer: A
Explore the full course: Iocl Engineers Officers Grade A Paper 2
Loading lesson…