← Quiz: C Functions and Recursion: all 10 questions
Quiz: C Functions and Recursion · Question 5 of 10
What happens if a recursive function has no base case?
What happens if a recursive function has no base case?
- A.It returns 0
- B.The compiler adds one
- C.It keeps calling itself until the stack overflows
- D.It runs once
Answer & explanation
Correct answer: It keeps calling itself until the stack overflows
Without a stopping condition the call stack grows until the program crashes.
Can you get the rest right without peeking?
Take the timed Quiz: C Functions and Recursion quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →