0

What we will do if the range of the input data is greater then the capacity of the declared variable

For example int has a range of 32,767 to 32,767 if the output is greater than range of int what we will do

22nd Oct 2016, 2:28 AM
abhishek
abhishek - avatar
3 ответов
+ 1
Well, simple answer, you 'll get a bad result as negative number. This is named as overflow error. But, for happy, in the modern compilators C++ for 32/64 bit procesors there is not range of int -32,767 to +32,767, but longer, –2,147,483,648 to 2,147,483,647.
22nd Oct 2016, 2:51 AM
Petr Hatina
Petr Hatina - avatar
+ 1
Circular queue
22nd Oct 2016, 8:29 AM
Anuj kaushik
Anuj kaushik - avatar
0
yes
22nd Oct 2016, 3:48 AM
nagesh