PRASHNIKAप्रश्निका
Back to the paper

Recursive data structure follows the LIFO principle.

Computer Science20241 markAssertion-reason

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

AI

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)
Data structures

From ISC 2024 Computer Science Paper 1, question 1(vi).