16. In a stack, if a user tries to remove an element from an empty stack it is called _

a) Underflow
b) Empty collection
c) Overflow
d) Garbage Collection

Answer: a
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.

Leave a Reply

Your email address will not be published.