0
What will happen if we declare data type integer of variable and user enters the value out of range of intger?
I mean how compiler will react to this problem and with 4 bytes how larger value can we enter?
2 Respostas
+ 3
Sometimes the compiler will crash the system, sometimes it will use the max/min value the variable can hold, that is why we commonly use try-catch statements, try statement for the input, catch statement will occur when user enters the value that is out of the integer range or when the user inputs a value that the variable can't hold.
+ 1
it wiol take only integer portion