Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - C language-signed integer and unsigned integer problems
C language-signed integer and unsigned integer problems
Numbers are divided into positive and negative numbers, and the plus sign before the positive number can be omitted. Unsigned numbers are actually numbers greater than or equal to zero. In C language, if a variable is defined as unsigned, it can only represent numbers greater than or equal to zero, while signed numbers contain negative numbers. If a variable is defined as signed, it can be assigned a negative or positive value. For example, unsigned int types usually range from 0 to 65535, while signed int types range from -32768 to 32767.