When a stack is full and no element can be added, it is called an ________.
(A) Overflow
(B) Extra flow
(C) Out of range
(D) Underflow
Answer:
Trying to add an element to a stack that is full, leads to a condition called overflow.
Checking the options
- Overflow - Trying to add an element to a stack that is full, leads to overflow.
- Extra flow - It is a concept in flow networks.
- Out of range - The error “list index out of range” arises in python if you try to access invalid indices of a list.
- (D) Underflow - Trying to delete an element from a stack that is empty, leads to underflow.
So, the correct answer is (A)