Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - C language format output problem
C language format output problem
Short I;

I =-4;

I is a short integer, occupying 2 bytes of memory, that is, 16-bit binary.

4: 0000 0000 0000 0 100 (binary representation)

therefore

-4: 1 1 1 1 1 1 1 1 1 1 1 165438.

Convert to hexadecimal (hec) to fffc.

1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1

Convert to Octal (oct) as 177774.

Unsigned refers to unsigned plastic data with a value range of 0-65535. Because the initial value of I is -4, the output value of I is 65532.