stdint.h

The stdint.h header defines integer types, limits of specified width integer types, limits of other integer types, and macros for integer constant expressions.

Note: For the exact width integer types, minimum-width integer types, limits of specified width integer types, and exact width integer constants, bit sizes N with the values 8, 16, 32, and 64 are supported.
Requirement: Use of the bit size 64 and greatest-width integer types or macros require LP64 or the long long data type to be available.

Integer types

The following exact width integer types are defined.
  • intN_t
  • uintN_t
The following minimum-width integer types are defined.
  • int_leastN_t
  • uint_leastN_t
The following fastest minimum-width integer types are defined. These types are the fastest to operate with among all integer types that have at least the specified width.
  • int_fastN_t
  • uint_fastN_t
The following greatest-width integer types are defined. These types hold the value of any signed/unsigned integer type.
Note: Requires long long to be available.
  • intmax_t
  • uintmax_t
The following integer types capable of holding object pointers are defined.
  • intptr_t
  • uintptr_t
Object-like macros for limits of integer types:
Macros for limits of exact width integer types.
  • INTN_MAX
  • INTN_MIN
  • UINTN_MAX
Macros for limits of minimum width integer types.
  • INT_LEASTN_MAX
  • INT_LEASTN_MIN
  • UINT_LEASTN_MAX
Macros for limits of fastest minimum width integer types.
  • INT_FASTN_MAX
  • INT_FASTN_MIN
  • UINT_FASTN_MAX
Macros for limits of greatest width integer types.
  • INTMAX_MAX
  • INTMAX_MIN
  • UINTMAX_MAX
Macros for limits of pointer integer types.
  • INTPTR_MAX
  • INTPTR_MIN
  • UINTPTR_MAX
Macros for limits of ptrdiff_t.
  • PTRDIFF_MAX
  • PTRDIFF_MIN
Macro for limit of size_t.
  • SIZE_MAX
Function-like macros for integer constants:
Macros for minimum width integer constants.
  • INTN_C(value)
  • UINTN_C(value)
Macros for greatest-width integer constants:
  • INTMAX_C(value)
  • UINTMAX_C(value)