let us see what over flow is here I'll take one variable of type character X. And this I will assign value
127 then I will say cout displayed it in the int form that is X and endl let's see what I get.
This is valid value within the range so i am getting 127.
Let me assign 128.
This is out of the range because the maximum value that i can stored in char is 127.
So I got a prompt.
I got a warning here that is implicit conversion from int to char changes value from 128 to minus 128.
as I said that over flow means it will take a cyclic value from after one twenty seven
that is the maximum it will turn into a minimum value possible.
So let us run and see what output we get.
see minus 128 if I take it as 127 only and I say X plus plus the let's see what happens.
The same thing again.
Overflow values overflown and it will take the next value.
I will assign 130.
So 130 gives me minus 125 so overflow,
it has taken the cyclic result. now i will take the value as one twenty eight and in that I will subtract
X minus minus.
This means the smallest no. is 128 and still decrementing it to take the largest value of type
character that is 127
Yes it is 127.
So these are overflowing the character character take just one bite.
So I have taken the example of a character you can do it with integer.
Also let me try integer, integer x assign int max.
So this is the maximum integer value.
Then after this if I say X plus plus
OK. before that
Let me print this on and see maximum integer is 2 1 4 7 4 8 3 6 4 7.
Now if I say X plus plus then it should take a smallest value.
Is the smallest value that is possible in int.
That is minimum integer.
So that's it about overflow.