+ 1
What is overflow and underflow of variables?
6 odpowiedzi
+ 2
Overflow is when you assign a value which is over the maximum permissable value
underflow is the opposite and you assign a value which is under the minimum permissable value
+ 2
Maleeha
same thing really:
int a = -9999999999999999; //doesn't work as an integer can hold from -2^32, this is underflow
+ 1
Agent can you give a practical example? in computer?
+ 1
practical example:
int a = 999999999999999; //this doesn't work, as an integer can hold values up to 2^31-1 (iirc) so you have an overflow
+ 1
got it ..and example of underflow? hinanawi
+ 1
thank you :)