👤

What happens when the pop operation is performed on empty stack?

Sagot :

Answer:

Underflow happens when we try to pop an item from an empty stack. If top is less than zero this means that an uncaught underflow has occurred.

source: https://www.toppr.com