Advertisements
Advertisements
Question
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.
Options
Both (A) and (R) are true and (R) is the correct explanation for (A).
Both (A) and (R) are true and (R) is not the correct explanation for (A).
(A) is true, but (R) is false.
(A) is false, but (R) is true.
MCQ
Solution
Both (A) and (R) are true and (R) is the correct explanation for (A).
Explanation:
Stack employs the Last-In-First-Out methodology.
shaalaa.com
Is there an error in this question or solution?