Exam-style question
Try this first
What happens when a recursive function never reaches its base case?.
- A.It continues making recursive calls until the program cannot continue normally
- B.It automatically changes into an iterative algorithm
- C.It returns the base-case value immediately
- D.It skips all the general cases and finishes
Answer and explanation
Concise answer
It continues making recursive calls until the program cannot continue normally
Why this is correct
Without reaching a base case, the recursive calls do not stop. This can cause the program to fail because too many calls are made.
Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.
Common mistake
No common mistake is linked to this question yet.
