stdint.h
The stdint.h
header provides type aliases and macros for fixed-width and standard integral types. The inttypes.h
header extends it with additional macros and functions.
Excluding type aliases int_fast8_t
, int_fast16_t
, int_fast32_t
, int_fast64_t
, int_least8_t
, int_least16_t
, int_least32_t
, int_least64_t
, intmax_t
, intptr_t
, uint_fast8_t
, uint_fast16_t
, uint_fast32_t
, uint_fast64_t
, uint_least8_t
, uint_least16_t
, uint_least32_t
, uint_least64_t
, uintmax_t
and uintptr_t
and macros INT_FAST8_MAX
, INT_FAST16_MAX
, INT_FAST32_MAX
, INT_FAST64_MAX
, INT_FAST8_MIN
, INT_FAST16_MIN
, INT_FAST32_MIN
, INT_FAST64_MIN
, INT_LEAST8_MAX
, INT_LEAST16_MAX
, INT_LEAST32_MAX
, INT_LEAST64_MAX
, INT_LEAST8_MIN
, INT_LEAST16_MIN
, INT_LEAST32_MIN
, INT_LEAST64_MIN
, INTMAX_MAX
, INTMAX_MIN
, INTPTR_MAX
, INTPTR_MIN
, PTRDIFF_MAX
, PTRDIFF_MIN
, SIG_ATOMIC_MAX
, SIG_ATOMIC_MIN
, UINT_FAST8_MAX
, UINT_FAST16_MAX
, UINT_FAST32_MAX
, UINT_FAST64_MAX
, UINT_LEAST8_MAX
, UINT_LEAST16_MAX
, UINT_LEAST32_MAX
, UINT_LEAST64_MAX
, UINTMAX_MAX
, UINTPTR_MAX
, WCHAR_MAX
, WCHAR_MIN
, WINT_MAX
and WINT_MIN
.
Type aliases
Signed
int8_t
- Alias for
signed char
int16_t
- Alias for
signed short int
int32_t
- Alias for
signed int
int64_t
- Alias for:
- (x86)
signed long long int
- (x86-64)
signed long int
- (x86)
Unsigned
uint8_t
- Alias for
unsigned char
uint16_t
- Alias for
unsigned short int
uint32_t
- Alias for
unsigned int
uint64_t
- Alias for:
- (x86)
unsigned long long int
- (x86-64)
unsigned long int
- (x86)
Macros
Signed
INT8_MIN
- Expands to −128
The minimum value forint8_t
. INT8_MAX
- Expands to 127
The maximum value forint8_t
. INT16_MIN
- Expands to −32,768
The minimum value forint16_t
. INT16_MAX
- Expands to 32,767
The maximum value forint16_t
. INT32_MIN
- Expands to −2,147,483,648
The minimum value forint32_t
. INT32_MAX
- Expands to 2,147,483,647
The maximum value forint32_t
. INT64_MIN
- Expands to −9,223,372,036,854,775,808
The minimum value forint64_t
. INT64_MAX
- Expands to 9,223,372,036,854,775,807
The maximum value forint64_t
.
SIZE_MAX
- Expands to 4,294,967,295
The maximum value forsize_t
.
Unsigned
UINT16_MAX
- Expands to 65,535
The maximum value foruint8_t
. UINT32_MAX
- Expands to 4,294,967,295
The maximum value foruint16_t
. UINT64_MAX
- Expands to 18,446,744,073,709,551,615
The maximum value foruint32_t
. UINT8_MAX
- Expands to 255
The maximum value foruint64_t
.
Function-like
INT8_C(value)
- Expands to a literal for
int8_t
.
value: numeric value [0-9], optionally signed. INT16_C(value)
- Expands to a literal for
int16_t
.
value: numeric value [0-9], optionally signed. INT32_C(value)
- Expands to a literal for
int32_t
.
value: numeric value [0-9], optionally signed. INT64_C(value)
- Expands to a literal for
int64_t
.
value: numeric value [0-9], optionally signed. UINT8_C(value)
- Expands to a literal for
uint8_t
.
value: numeric value [0-9]. UINT16_C(value)
- Expands to a literal for
uint16_t
.
value: numeric value [0-9]. UINT32_C(value)
- Expands to a literal for
uint32_t
.
value: numeric value [0-9]. UINT64_C(value)
- Expands to a literal for
uint64_t
.
value: numeric value [0-9].