Second, the ranges of the two values are different.
The basic data types in C and C++ languages are: char, integer (short, int, long), float, double?
At the same time, the types and shaping of characters can continue to be divided into signed and unsigned. By default, they are all signed. If you want to use unsigned, you can use it with unsigned description. If it is signed, the highest bit will indicate the sign bit, the highest bit is 0, indicating a positive number, and the highest bit is 1, indicating a negative number. Therefore, according to this, we can get different types of data ranges in signed and unsigned cases respectively: