Which of the following operations performed on the stack are TRUE?
(A) PUSH adds a new element at the TOP of the stack.
(B) POP operation is used to remove the top most element of the stack.
(C) Trying to add an element to a full stack results in an exception called ‘underflow’.
(D) Trying to delete an element from an empty stack results in an exception called ‘underflow’.
Which of the following operations performed on the stack are TRUE?
(A) PUSH adds a new element at the TOP of the stack.
(B) POP operation is used to remove the top most element of the stack.
(C) Trying to add an element to a full stack results in an exception called ‘underflow’.
(D) Trying to delete an element from an empty stack results in an exception called ‘underflow’.
Solution
PUSH inserts a new element at the TOP of the stack, and POP removes the topmost element, so (A) and (B) are true. Trying to delete from an empty stack gives an "underflow" exception, so (D) is true.
Option 2: (C) is false. Adding an element to a full stack causes "overflow", not underflow.
Memory trick: overflow = too many pushed (full stack), underflow = too many popped (empty stack).
Related questions:
2026: 29 May Shift 2
2026: 21 May Shift 1
2026: 31 May Shift 1