COMPUTER SCIENCE AND ENGINEERING
DATA STRUCTURES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Overflow
|
|
Underflow
|
|
Syntax Error
|
|
Garbage Value
|
Detailed explanation-1: -When a pop() operation is called on an empty queue, what is the condition called? Answer-B) pop() on an empty queue causes Underflow. 17.
Detailed explanation-2: -The process to add an element into queue is called Enqueue and the process of removal of an element from queue is called Dequeue.
Detailed explanation-3: -Explanation: Underflow occurs when the user performs a pop operation on an empty stack.
Detailed explanation-4: -Underflow Condition: When a stack is empty (i.e. TOP=-1) and we try to delete more element from it, then this condition is called underflow condition.
Detailed explanation-5: -Simply put, overflow and underflow happen when we assign a value that is out of range of the declared data type of the variable. If the (absolute) value is too big, we call it overflow, if the value is too small, we call it underflow.