Which of the following condition will occur if one tries to delete an element from Empty STACK ?
Which of the following condition will occur if one tries to delete an element from Empty STACK ?
Solution
✅ Correct Option: 2
Deleting (popping) from a stack that has no elements causes an UNDERFLOW condition. There is nothing at the top to remove, so the pop operation cannot be done.
Option 1: OVERFLOW is the opposite case, where an element is pushed onto a stack that is already full.
Option 4: this is a run-time condition, not a compile-time error, so the program still compiles.
Related questions:
2026: 23 May Shift 2
2026: 11 May Shift 2