Google News
logo
Data Structures - Quiz(MCQ)
In a stack, if a user tries to remove an element from an empty stack it is called _________
A)
Overflow
B)
Underflow
C)
Empty collection
D)
Garbage Collection

Correct Answer :   Underflow


Explanation : Underflow occurs when the user performs a pop operation on an empty stack. Overflow occurs when the stack is full and the user performs a push operation. Garbage Collection is used to recover the memory occupied by objects that are no longer used.

Advertisement