Question 8
Back to Exercise
Do recursive calls share their local variables?
- A Yes – all calls use the same variables
- B Only parameters are shared
- C No – each call has its own frame with its own locals Correct
- D Only in nested functions
Correct Answer: Option C
That is why n in each call keeps its own value while deeper calls run.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!