Extended integer types and functions
in <inttypes.h> and <stdint.h> in
C99
In C90, the long data type can serve both as
the largest integral type, and as a 32-bit container. C99 removes
this ambiguity through the new standard library header files <inttypes.h> and <stdint.h>.
The header file <stdint.h> introduces
the new types:
intmax_t and uintmax_t,
that are maximum width signed and unsigned integer types
intptr_t and unintptr_t,
that are integer types capable of holding signed and unsigned object
pointers.
The header file <inttypes.h> provides
library functions for manipulating values of type intmax_t,
including:
intmax_t imaxabs(intmax_t x); // absolute value of x
imaxdiv_t imaxdiv(intmax_t x, intmax_t y) // returns the quotient and remainder
// of x / y
These header files are also available in C90 and C++.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.