#include <stdint.h>
Use [u]intN_t if you need exactly N bits.
Since these typedefs are mandated by the C99 standard, they are preferred over rolling your own typedefs.
define a constant of type int16_t
largest positive value an int16_t can hold.
smallest negative value an int16_t can hold.
define a constant of type int32_t
largest positive value an int32_t can hold.
smallest negative value an int32_t can hold.
define a constant of type int64_t
largest positive value an int64_t can hold.
smallest negative value an int64_t can hold.
define a constant of type int8_t
largest positive value an int8_t can hold.
smallest negative value an int8_t can hold.
largest positive value an int_fast16_t can hold.
smallest negative value an int_fast16_t can hold.
largest positive value an int_fast32_t can hold.
smallest negative value an int_fast32_t can hold.
largest positive value an int_fast64_t can hold.
smallest negative value an int_fast64_t can hold.
largest positive value an int_fast8_t can hold.
smallest negative value an int_fast8_t can hold.
largest positive value an int_least16_t can hold.
smallest negative value an int_least16_t can hold.
largest positive value an int_least32_t can hold.
smallest negative value an int_least32_t can hold.
largest positive value an int_least64_t can hold.
smallest negative value an int_least64_t can hold.
largest positive value an int_least8_t can hold.
smallest negative value an int_least8_t can hold.
define a constant of type intmax_t
largest positive value an intmax_t can hold.
smallest negative value an intmax_t can hold.
largest positive value an intptr_t can hold.
smallest negative value an intptr_t can hold.
largest positive value a ptrdiff_t can hold.
smallest negative value a ptrdiff_t can hold.
largest positive value a sig_atomic_t can hold.
smallest negative value a sig_atomic_t can hold.
largest value a size_t can hold.
define a constant of type uint16_t
largest value an uint16_t can hold.
define a constant of type uint32_t
largest value an uint32_t can hold.
define a constant of type uint64_t
largest value an uint64_t can hold.
define a constant of type uint8_t
largest value an uint8_t can hold.
largest value an uint_fast16_t can hold.
largest value an uint_fast32_t can hold.
largest value an uint_fast64_t can hold.
largest value an uint_fast8_t can hold.
largest value an uint_least16_t can hold.
largest value an uint_least32_t can hold.
largest value an uint_least64_t can hold.
largest value an uint_least8_t can hold.
define a constant of type uintmax_t
largest value an uintmax_t can hold.
largest value an uintptr_t can hold.
16-bit signed type.
32-bit signed type.
64-bit signed type.
8-bit signed type.
fastest signed int with at least 16 bits.
fastest signed int with at least 32 bits.
fastest signed int with at least 64 bits.
fastest signed int with at least 8 bits.
signed int with at least 16 bits.
signed int with at least 32 bits.
signed int with at least 64 bits.
signed int with at least 8 bits.
16-bit unsigned type.
32-bit unsigned type.
64-bit unsigned type.
8-bit unsigned type.
fastest unsigned int with at least 16 bits.
fastest unsigned int with at least 32 bits.
fastest unsigned int with at least 64 bits.
fastest unsigned int with at least 8 bits.
unsigned int with at least 16 bits.
unsigned int with at least 32 bits.
unsigned int with at least 64 bits.
unsigned int with at least 8 bits.