Computer Science, asked by NANDITA596, 11 months ago

Difference between overflow and underflow in data structure

Answers

Answered by MrrrrInnocent
4

The situation where an integer outside the allowed range requires more bits than can be stored is called an overflow. Similarly, with real numbers, an exponent that is too small to be stored causes an underflow.

Answered by yoodyannapolis
2

Difference between overflow and underflow in the data structure is given below:-

Explanation:

Overflow:-

  • Overflow happens when the exact value of the amount is too big for the machine to reflect it.
  • Overflow happens when we attempt to add more objects to the stack than it can accommodate.
  • That situation where an integer outside the permitted range needs more bits than can be processed is called overflow.

Underflow:-

  • Underflow is that when the exact value of the amount is too near zero for the machine to interpret it. You can get underflow for a floating-point amount.
  • Underflow occurs when we seek to pull an element out of a full-stack.
  • An amount that is too high to store creates an underflow.

Learn more:-

brainly.in/question/6578286

Similar questions