Prashnikaप्रश्निका
Code
About
‹ Back to the paper

Question 1(vi)

1 mark

Computer ScienceISC 2024 Computer Science Paper 1Assertion-reasonData structures

Study the Assertion and Reason and choose the correct option.

Recursive data structure follows the LIFO principle.

Assertion: Recursive data structure follows the LIFO principle.

Reason: Execution of recursive code follows the concepts of data structure Queue.

  • (a)Both Assertion and Reason are true, and Reason is the correct explanation for the Assertion.
  • (b)Both Assertion and Reason are true, but Reason is not the correct explanation for the Assertion.
  • (c)Assertion is true but Reason is false.
  • (d)Assertion is false but Reason is true.

Answer

Answer

Correct option: (c)

The Assertion is true: recursive calls are managed via the function call stack, so recursion does follow the LIFO (Last In First Out) principle. The Reason is false: execution of recursive code follows the concept of a Stack, not a Queue. Answer: (c)