Names specified here
Name Description Notes Source Availability
ATOMIC_INT_LOCK_FREE Lock-free property of type atomic_int ? M <stdatomic.h> C11
atomic_int Atomic integer type ? T <stdatomic.h> C11
atomic_uint Atomic integer type ? T <stdatomic.h> C11
INT_MAX Maximum value of int L M <limits.h> C89 C90 C95 C99 C11
INT_MIN Minimum value of int L M <limits.h> C89 C90 C95 C99 C11
int Signed integer type L T Native C89 C90 C95 C99 C11
UINT_MAX Maximum value of unsigned L M <limits.h> C89 C90 C95 C99 C11
unsigned Unsigned integer type L T Native C89 C90 C95 C99 C11

int is a signed integer type with the range INT_MIN to INT_MAX, which is at least ±32767. It can also be called signed int, int signed or signed. Use %d or %i with printf to print an int. Use %d or %i with scanf to scan an int. Constants of type int have no suffix.

Character constants such as 's' have type int. int is also used by functions such as getchar to return either a character or EOF to signify a lack of further characters, by allowing both to be represented with distinct values in a single type.

unsigned is an unsigned integer type with the range 0 to UINT_MAX, which is at least +65535. It can also be called int unsigned or unsigned int. Use %u, %o, %x or %X with printf to print an unsigned. Use %u, %o or %x with scanf to scan an unsigned. Constants of type unsigned are suffixed with u or U.

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

atomic_uint is an alias for _Atomic unsigned. atomic_int is an alias for _Atomic int. These types are lock-free always if ATOMIC_INT_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