+1 vote
in Data Structures & Algorithms I by (110k points)
Pushing an element into stack already having five elements and stack size of 5, then stack becomes ___________

(a) Overflow

(b) Crash

(c) Underflow

(d) User flow

This interesting question is from Stack Operations topic in division Abstract Data Types of Data Structures & Algorithms I

This question was posed to me during an interview for a job.

1 Answer

+1 vote
by (412k points)
selected by
Best answer
Right answer is (a) Overflow

For explanation: The stack is filled with 5 elements and pushing one more element causes a stack overflow. This results in overwriting memory, code and loss of unsaved work on the computer.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.