© examsnet.com
Question : 7 of 12
Marks: +1, -0
Q. 17 and 18 are ASSERTION (A) and REASONING (R) based questions. Mark the correct choice as
(a) Both (A) and (R) are true and (R) is the correct explanation for (A).
(b) Both (A) and (R) are true and (R) is not the correct explanation for (A).
(c) (A) is true but (R) is false.
(d) (A) is false but (R) is true.
Assertion (A): A stack is a LIFO structure.
Reason (R): Any new element pushed into the stack always gets positioned at the index after the last existing element in the stack.
[CBSE 2023 Set 4]
Solution:  
Concept:
In an Assertion-Reason question, first check each statement on its own, then ask whether the Reason really explains why the Assertion is true.
Assertion: In a stack, insertion (push) and deletion (pop) take place only at one end, the TOP, so the element pushed last is popped first: Last In First Out. True.
Reason: A stack is defined only by its TOP; the index at which a new element is stored depends on how the stack is implemented. With append() the new element goes after the last element, but a stack can also be implemented with the TOP at index 0 (insert(0, x)), where the new element goes before all the others. So the claim that it always goes at the index after the last existing element is False.
Key point: LIFO comes from push and pop working at the same end (TOP), not from any particular index.
Answer:
Option C ((A) is true but (R) is false.)
© examsnet.com
Advertisements
Go to Question: