Print Format Macros for Unsigned Integers

The macros in following table expand to character string literals and can be used with the printf family of functions when printing unsigned integer values.

Macro Name Description Value
PRIo8 Octal placeholder string for an unsigned 8-bit integer type. "o"
PRIo16 Octal placeholder string for an unsigned 16-bit integer type. "o"
PRIo32 Octal placeholder string for an unsigned 32-bit integer type. "lo"
PRIo64 Octal placeholder string for an unsigned 64-bit integer type, where supported. "llo"
PRIu8 Unsigned placeholder string for an unsigned 8-bit integer type. "u"
PRIu16 Unsigned placeholder string for an unsigned 16-bit integer type. "u"
PRIu32 Unsigned placeholder string for an unsigned 32-bit integer type. "lu"
PRIu64 Unsigned placeholder string for an unsigned 64-bit integer type, where supported. "llu"
PRIx8/ PRIX8 Hexadecimal placeholder string for an unsigned 8-bit integer type. "x"/"X"
PRIx16/ PRIX16 Hexadecimal placeholder string for an unsigned 16-bit integer type. "x"/"X"
PRIx32/ PRIX32 Hexadecimal placeholder string for an unsigned 32-bit integer type. "lx"/"X"
PRIx64/ PRIX64 Hexadecimal placeholder string for an unsigned 64-bit integer type, where supported. "llx"/"X"
PRIoFAST8 Octal placeholder string for the fastest signed integer type with a width of at least 8. "o"
PRIoFAST16 Octal placeholder string for the fastest signed integer type with a width of at least 16. "o"
PRIoFAST32 Octal placeholder string for the fastest signed integer type with a width of at least 32. "lo"
PRIoFAST64 Octal placeholder string for the fastest signed integer type with a width of at least 64, where supported. "llo"
PRIuFAST8 Unsigned placeholder string for the fastest signed integer type with a width of at least 8 bits. "u"
PRIuFAST16 Unsigned placeholder string for the fastest signed integer type with a width of at least 16. "u"
PRIuFAST32 Unsigned placeholder string for the fastest signed integer type with a width of at least 32. "lu"
PRIuFAST64 Unsigned placeholder string for the fastest signed integer type with a width of at least 64, where supported. "llu"
PRIxFAST8/PRIXFAST8 Hexadecimal placeholder string for the fastest signed integer type with a width of at least 8. "x"/"X"
PRIxFAST16/PRIXFAST16 Hexadecimal placeholder string for the fastest signed integer type with a width of at least 16. "x"/"X"
PRIxFAST32/PRIXFAST32 Hexadecimal placeholder string for the fastest signed integer type with a width of at least 32. "lx"/"lX"
PRIxFAST64/PRIXFAST64 Octal placeholder string for the fastest signed integer type with a width of at least 64, where supported. "llx"/"llX"
PRIoLEAST8 Octal placeholder string for a signed integer type with a width of at least 8 bits. "o"
PRIoLEAST16 Octal placeholder string for a signed integer type with a width of at least 16 bits. "o"
PRIoLEAST32 Octal placeholder string for a signed integer type with a width of at least 32 bits. "lo"
PRIoLEAST64 Octal placeholder string for a signed integer type with a width of at least 64 bits, where supported. "llo"
PRIuLEAST8 Unsigned placeholder string for a signed integer type with a width of at least 8 bits. "u"
PRIuLEAST16 Unsigned placeholder string for a signed integer type with a width of at least 16 bits. "u"
PRIuLEAST32 Unsigned placeholder string for a signed integer type with a width of at least 32 bits. "lu"
PRIuLEAST64 Unsigned placeholder string for a signed integer type with a width of at least 64 bits, where supported. "llu"
PRIoMAX Octal placeholder string for a signed integer type with maximum width. "llo"where 64-bit integers are supported; "lo" otherwise
PRIuMAX Unsigned placeholder string for a signed integer type with maximum width. "llu"where 64-bit integers are supported; "lu" otherwise
PRIxMAX/PRIXMAX Hexadecimal placeholder string for a signed integer type with maximum width. "llx"/"llX" where 64-bit integers are supported; "lx"/"lX" otherwise
PRIoPTR Octal placeholder string for uintptr_t. "lo"
PRIuPTR Unsigned placeholder string for uintptr_t. "lu"
PRIxPTR/PRIXPTR Hexadecimal placeholder string for uintptr_t. "lx"/"lX"