Jump to content

Inttypes.h

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Kbolino (talk | contribs) at 03:58, 19 April 2005 (genesis). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

The inttypes.h file is a C header file that is part of the C standard library and API. It defines integral types whose sizes are specific and gauranteed. The behavior of the signed and unsigned modifiers upon these types is undefined; use like-size or widening casts within these types instead.

Integral types defined by inttypes.h
Specifier Signing Bits Bytes Minimum Maximum
int8_t Signed 8 1 -128 127
uint8_t Unsigned 8 1 0 255
int16_t Signed 16 2 -32 768 32 767
uint16_t Unsigned 16 2 0 65 535
int32_t Signed 32 4 -2 147 483 648 2 147 483 647
uint32_t Unsigned 32 4 0 4 294 967 295
int64_t Signed 64 8 -9 223 372 036 854 775 808 9 223 372 036 854 775 807
uint64_t Unsigned 64 8 0 18 446 744 073 709 551 615

See also