logo

AQA A-Level Computer Science practice

What happens when a recursive function never reaches its base case?

Try the question first, then check the answer and practise the same topic again.

At a glance

MCQ

Type

practice

Style

Topic

Programming

Exam-style question

Try this first

What happens when a recursive function never reaches its base case?.

  1. A.It continues making recursive calls until the program cannot continue normally
  2. B.It automatically changes into an iterative algorithm
  3. C.It returns the base-case value immediately
  4. 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.

Related flashcards

No flashcards are published for this page yet.

Related practice questions