man.bsd.lv manual page server

Manual Page Search Parameters

INTTYPES(3) Library Functions Manual INTTYPES(3)

inttypesstandard fixed-size integer types

#include <inttypes.h>

The <inttypes.h> header describes a set of format specifier macros aimed to increase portability both within and across operating systems. It includes the <stdint.h> header and extends it with additional facilities.

Each of the following macros expand to a character string literal containing the format specifier suitable for use within the format argument of a formatted I/O function such as printf(3). Each macro contains an identifier (PRI or SCN), a conversion specifier, and a possible length modifier.

The length modifier follows the integer types described in stdint(3):

The following format specifiers are defined for the fprintf(3) and fscanf(3) families, respectively:

The available conversion specifiers, “?” in above, are and for signed integers and , , , and X for unsigned integers. The X is not available for the fscanf(3) family. Without the length modifier these would correspond with , , , , , and , respectively.

The following example demonstrates typical usage:

uint64_t i = 123;

...

(void)printf("i = %"PRIu64"\n", i);

printf(3), scanf(3), stdint(3)

The <inttypes.h> header conforms to ISO/IEC 9899:1999 (“ISO C99”) and IEEE Std 1003.1-2001 (“POSIX.1”).

The <inttypes.h> header was first introduced in NetBSD 1.6.

March 21, 2010 NetBSD-9.2