‹ Back to the paper
Question 21
1 mark
Computer ScienceISC Computer Science - Competency Focused Practice Questions (CISCE, August 2024)Assertion-reasonRecursion
Study the Assertion and Reason and choose the correct option.
Recursion utilises more memory as compared to iteration.
Assertion: Recursion utilises more memory as compared to iteration.
Reason: 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.
Answer
Answer
Correct option: b
Answer: (b) Both A and R are true, but R is not the correct explanation of A.
Both statements are true: recursion does use more memory than iteration because each call adds a stack frame, and a missing base case does cause infinite recursion. But R explains why recursion without a base case fails to terminate, not why recursion in general (even with a base case) uses more memory than iteration, so R does not explain A.