CBSE Class 12 Computer Science Question 21 of 63

Data Structures in Python — Question 4

Back to all questions
4
Question

Question 4

Pushing an element into a Stack already having five elements and a Stack of size 5, then the Stack becomes:

  1. User flow
  2. Crash
  3. Underflow
  4. Overflow
Answer

Overflow

Reason — When pushing an element into a stack that already has five elements and the stack size is limited to 5, the situation is called an "overflow." This is because the stack has reached its maximum capacity, and adding another element would exceed the stack's limit, resulting in an overflow condition.