Tail Recursion Optimization
A recursive method is considered tail-recursive if its recursive call is the final operation performed. Which of the following statements best describes the principle of tail-recursion optimization?
A
Tail recursion optimization increases the number of recursive calls, which often leads to a stack overflow.
B
Tail recursion eliminates the need for a base case in a recursive method.
C
Tail recursion optimization allows the compiler to reuse the current function’s stack frame for the recursive call, thereby reducing stack usage.
D
Tail recursion forces the recursive call to be executed before any other operations in the calling function.
Question Leaderboard
Not enough data yet to show leaderboard.
