MCQ Single Best Answer Moderate

Q
[Recursion]

Assertion (A): Recursion utilizes more memory as compared to iteration.
Reason (R): Absence of base case leads to infinite recursion.

ID: #24954 Competency focused Practice Questions ISC Class XII Computer Science 3 views
Question Info
#24954Q ID
ModerateDifficulty
Competency focused Practice Questions ISC Class XII Computer ScienceTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A Both A and R are true, and R is the correct explanation of A.
  • B Both A and R are true, and R is not the correct explanation of A.
  • C A is true, but R is false.
  • D A is false, but R is true.
Correct Answer: Option B

Explanation

[Recursion]

Assertion (A): Recursion utilizes more memory as compared to iteration.
Reason (R): Absence of base case leads to infinite recursion.
(a) Both A and R are true, and R is the correct explanation of A.
(b) Both A and R are true, and R is not the correct explanation of A.
(c) A is true, but R is false.
(d) A is false, but R is true.
Correct Answer: (b)

Step 1: Understanding the Assertion (A)

Recursion utilizes more memory as compared to iteration.

This statement is true.

In recursion:

  • Each recursive call is stored in the call stack
  • Memory is allocated for local variables and function states
  • More recursive calls → more stack memory usage
Recursion uses stack memory for every function call.

Iteration generally uses less memory because loops do not create multiple stack frames.

Step 2: Understanding the Reason (R)

Absence of base case leads to infinite recursion.

This statement is also true.

In recursion, a base case stops recursive calls.

Without base case → recursive calls continue forever

This may finally cause:

  • Stack Overflow Error
  • Program crash

But Is R the Correct Explanation of A?

No.

The assertion says recursion uses more memory than iteration. This happens because:

  • Each recursive call creates a new stack frame
  • Function states and local variables are stored repeatedly

The reason talks about:

  • Infinite recursion due to missing base case

Although true, it does not directly explain why recursion generally consumes more memory than iteration.

Important Difference:

Concept Description
More Memory Usage Due to multiple recursive function calls stored in stack
Infinite Recursion Happens when base case is missing

Conclusion:

  • Assertion (A) → True ✅
  • Reason (R) → True ✅
  • But R is NOT the correct explanation of A ❌
Correct Answer: (b)

Share This Question

Challenge a friend or share with your study group.