Functions & recursion
7 practice questionsComputer ScienceStep-by-step solutions
Try a few
1
A variable that is accessible only within the function where it is declared is called:
A.A global variable
B.A local variable
C.A constant
D.A pointer
2
Every well-formed recursive function must have a:
A.Loop
B.Base case to stop recursion
C.Global variable
D.Pointer
3
What essential element prevents a recursive function from recursing forever?
A.A global variable
B.A base case
C.A while loop
D.A return type
Master functions & recursion โ not just preview it
All 7 questions with worked solutions, an AI tutor that explains every step, and games that make the drilling stick. Free to start.
Practice this topic freeNo card needed ยท 10 free AI questions daily