🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.It returns 0
  2. B.The compiler adds one
  3. C.It keeps calling itself until the stack overflows
  4. 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 →