answersLogoWhite

0

What would result in an overflow?

Updated: 2/13/2020
User Avatar

Wiki User

13y ago

Best Answer

An overflow occurs when you attempt a mathematical operation that results in a number that cannot be stored in the variable type you are using.

C# projects only check for overflows if you have explicitly configured the project to do so (because it slighly slows down your application). To do this, you have to go into the Project Properties page, Build tab, click Advanced, and then choose "Check for arithmetic overflow/underflow"

If you set this option, then this code, which attempts to add 1 to a integer that is already at the maximum value that the 32-bit integer type can hold, would cause an overflow:

int a = int.MaxValue;

a++;

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What would result in an overflow?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What do you mean by arithmetic overflow?

arithmetic overflow is a situation that occurs when a calculation or operation yields a result that is too large for the system storage or register to handle. Overflow can also refer to the amount the result exceeds the memory designated for storage. ( basically too much, That's why its called overflow)


When would an overflow error occur?

Most likely during an unkown "command" overflow


Arithmetic overflow in two's complement?

Overflow for Two's Complement when: - the operands have the same sign and the result differs from them in sign or - the carry-in and carry-out associated with the left-most position differ


How do you detect overflow when adding two numbers in 2s complement form?

You can detect overflow if the result turns out to be negative (which is the same as checking to see if the sign bit is 1). For example if you tried to add 5 and 6 in to 4-bit 2s complement, you would get 0101 + 0110 = 1011, which is a negative number since the sign bit (the 1 on the left) is a 1. This is an overflow.


Why does the power steering fluid overflow the reservior when engine is running on a 1999 acura 3.2tl?

If it was low recently and you filled it, it could be air in the system. The overflow can also result when pressure in the tank is too high. This is often the result of a faulty power steering pump.


What body of water was important to ancient egyptians and why?

The NILE of course. the Nile overflows ones/few nights a year--as a result, it would fertile the lands and the people would be able to farm. If it does not overflow, the agriculture there would be in big trouble.


What would cause the overflow tank on a 1992 Jeep Cherokee to overflow?

Antifreez, make sure your mixture is right


Does homeowners ins cover overflow of bathtubs?

Yes, But only if you have water overflow endorsement on your policy. Otherwise there would be no coverage.


Why are the heart valves not very stretchy?

Because if they were, then too much blood would fill the left atrium (lower left), and it would overflow, causing too much blood to flow through the veins which could result in them breaking.


Is the sealed cooling system in a 1997 Oldsmobile Cutlass Supreme supposed to have a vent in the overflow reservoir?

Yes there should be a overflow vent in the overflow reservoir. Think about it this why, if it was not there and pointing downward. If during a overheat period the lid were to pop off. The result would be a hot water volcano. Trust me you don't want that. Good Luck and Remember.Change Your Mind, Not Your Oil.Use the First In Synthetic Motor Oil's.See My Bio For more information.


Why does the overflow reservoir overflow?

because the entire point of the overflow resovoir is to overflow, and release uneeded water


Which two Latin words mean overflow?

There are a number of (single) words available, inrigo as in to overflow or irrigate, abundo as in to be abundant and overflow, superfundo as in to flood or overflow, restagno as in to be swamped or overflow, exundo as in to flow out or overflow, adfluentia as in to overflow with abundance