int32_t3type
Fixed-width basic integer types
Part of intN_t(3type).
Usage
typedef /* ...
*/
int8_t;
typedef
/* ...
*/
int16_t;
typedef
/* ...
*/
int32_t;
typedef
/* ...
*/
int64_t;
typedef /* ...
*/
uint8_t;
typedef
/* ...
*/
uint16_t;
typedef
/* ...
*/
uint32_t;
typedef
/* ...
*/
uint64_t;
Library
Standard C library (libc)
Overview
intN_t are signed integer types of a fixed width of exactly N bits, N being the value specified in its type name. They are be capable of storing values in the range [INTN_MIN, INTN_MAX], substituting N by the appropriate number.
uintN_t are unsigned integer types of a fixed width of exactly N bits, N being the value specified in its type name. They are capable of storing values in the range [0, UINTN_MAX], substituting N by the appropriate number.
According to POSIX, [u]int8_t, [u]int16_t, and [u]int32_t are required; [u]int64_t are only required in implementations that provide integer types with width 64; and all other types of this form are optional.
The macros [U]INTN_WIDTH expand to the width in bits of these types (N).
The macros [U]INTN_MAX expand to the maximum value that these types can hold.
The macros INTN_MIN expand to the minimum value that these types can hold.
The macros [U]INTN_C() expand their argument to an integer constant of type [u]intN_t.
The length modifiers for the [u]intN_t types for the printf(3) and scanf(3) families of functions are wN, resulting for example in %w64d or %w64i for printing or scanning int64_t values.
Notes
The following header also provides these types: <inttypes.h>. <arpa/inet.h> also provides uint16_t and uint32_t.
History
- Arch Linux 2026-11-01: the text shown here
- Debian 13 (Trixie)
- Debian 12 (Bookworm)