Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - C language data overflow
C language data overflow
the value range of signed int data is-32768 ~ 32767, and the total number of 2 bytes is ***16 bits, with the first bit being the sign bit. If the number is positive, the first bit is , while the number of negative numbers is 1. The maximum value of an integer is , and the next 15 bits are all 1, which is 32767. If you add 1 as mentioned in the question.