Names specified here
Name Description Notes Source Availability
ATOMIC_SHORT_LOCK_FREE Lock-free property of type atomic_short ? M <stdatomic.h> C11
atomic_short Atomic integer type ? T <stdatomic.h> C11
atomic_ushort Atomic integer type ? T <stdatomic.h> C11
SHRT_MAX Maximum value of short L M <limits.h> C89 C90 C95 C99 C11
SHRT_MIN Minimum value of short L M <limits.h> C89 C90 C95 C99 C11
short Signed integer type L T Native C89 C90 C95 C99 C11
USHRT_MAX Maximum value of unsigned short L M <limits.h> C89 C90 C95 C99 C11
unsigned short Unsigned integer type L T Native C89 C90 C95 C99 C11

short is a signed integer type with the range SHRT_MIN to SHRT_MAX, which is at least ±32767. It can also be called signed short or short signed. Use %d or %i with printf to print an short. Use %hd or %hi with scanf to scan an short.

unsigned short is an unsigned integer type with the range 0 to USHRT_MAX, which is at least +65535. It can also be called short unsigned. Use %u, %o, %x or %X with printf to print an unsigned short. Use %hu, %ho or %hx with scanf to scan an unsigned short.

sizeof(short) and sizeof(unsigned short) are the same. short and unsigned short are intended to be of a ‘compact size’ for an integer on the platform you're using. They are usually wider than char, signed char and unsigned char, and no wider than int and unsigned.

atomic_ushort is an alias for _Atomic unsigned short. atomic_short is an alias for _Atomic short. These types are lock-free always if ATOMIC_SHORT_LOCK_FREE is 2, sometimes if 1, and never if 0.


CHaR
Sitemap Supported
Site format updated 2024-06-05T22:37:07.391+0000
Data updated 1970-01-01T00:00:00.000+0000
Page updated 2022-06-17T21:43:05.000+0000