Write a C program to do the following Declare an integer var
Write a C++ program to do the following:
Declare an integer variable of size 4 bytes.
Set the variable to 2,147,483,645 and print it to the screen using std:cout.
Add 1 to the variable and print it to the screen using std:cout.
Add 1 to the variable and print it to the screen using std:cout.
Add 1 to the variable and print it to the screen using std:cout.
Add 1 to the variable and print it to the screen using std:cout.
Explain why you got the results you did for the last two cases. This result is common to most programming languages. MATLAB deal with this issue in the different way. What is it?
Solution
In Normal programming languages when integer range is reached it starts rounding up the integer to its nearest in circle which is negative.
but in Matlab integer data type has unsigend 8 byte to 64 and signed 8byte to 64 bytes .
and when the range is reached it can be changed to other ranges.

