Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How to output short data
How to output short data
Short Type Data Output: It will fetch the corresponding length of data from the memory according to your placeholder (i.e. %d). For example, if sizeof(int) = 4, it will get 4 bytes and display them.

Unsigned short d; printf("d = %u\n ",d); Output unsigned short, unsigned int generally uses %u, and output unsigned long generally uses %lu. c = a; c & lt& lt= 16; c | = b; In this way, the output c is the sum of two a and B. A is 16 bit high, and b is 16 bit low.

Integer data is an integer. The general classification of integer data is as follows:

Basic type: the type specifier is int, which takes up 4 bytes of memory.

Short integer: the type specifier is Short int or short. The range of bytes and values occupied is the same as that of the basic type.

Long integer: the type specifier is long int or long, which takes up 4 bytes of memory. ?

Unsigned: The type specifier is unsigned.

Unsigned primitive: The type specifier is unsigned int or unsigned.

Unsigned short integer: The type specifier is an unsigned short integer.