Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What is unsigned int in C language?
What is unsigned int in C language?
Unsigned integer means "unsigned integer", that is, all integers 32- 1 from 0 to 2. The int after unsigned can be omitted.

The specific usage is as follows:

Unsigned a;

a = 5;

Or: unsigned int a;;

a = 5;

In the 16 bit system, an int can store data in the range of -32768~32767, while an unsigned int can store data in the range of 0~65535. In a computer, integers are stored in the form of complement.

Depending on the highest order, if it is 1, the signed number is negative; If it is an unsigned number, it is interpreted as a positive number. At the same time, in the case of the same number of digits, the range of integers that can be expressed becomes larger.

Extended data

1 and int are integers that define the type of variables. Signed unsigned integer is an unsigned integer type. To put it bluntly, signed unsigned integers are negative numbers. Can they be stored?

2. According to different program compilers, the number of bytes defined by shaping is different. Pay attention to the range of values.