The macros in following table expand to character string literals and can be used with
the printf
family of functions when printing signed integer values.
Macro Name | Description | Value |
---|---|---|
PRId8 |
Decimal placeholder string for a signed 8-bit integer type. | "d" |
PRId16 |
Decimal placeholder string for a signed 16-bit integer type. | "d" |
PRId32 |
Decimal placeholder string for a signed 32-bit integer type. | "ld" |
PRId64 |
Decimal placeholder string for a signed 64-bit integer type, where supported. | "lld" |
PRIi8 |
Integer placeholder string for a signed 8-bit integer type. | "i" |
PRIi16 |
Integer placeholder string for a signed 16-bit integer type. | "i" |
PRIi32 |
Integer placeholder string for a signed 32-bit integer type | "li" |
PRIi64 |
Integer placeholder string for a signed 64-bit integer type, where supported. | "lli" |
PRIdFAST8 |
Decimal placeholder string for the fastest signed integer type with a width of at least 8. | "d" |
PRIdFAST16 |
Decimal placeholder string for the fastest signed integer type with a width of at least 16. | "d" |
PRIdFAST32 |
Decimal placeholder string for the fastest signed integer type with a width of at least 32. | "ld" |
PRIdFAST64 |
Decimal placeholder string for the fastest signed integer type with a width of at least 64, where supported. | "lld" |
PRIiFAST8 |
Integer placeholder string for the fastest signed integer type with a width of at least 8 bits. | "i" |
PRIiFAST16 |
Integer placeholder string for the fastest signed integer type with a width of at least 16. | "i" |
PRIiFAST32 |
Integer placeholder string for the fastest signed integer type with a width of at least 32. | "li" |
PRIiFAST64 |
Integer placeholder string for the fastest signed integer type with a width of at least 64, where supported. | "lli" |
PRIdLEAST8 |
Decimal placeholder string for a signed integer type with a width of at least 8 bits. | "d" |
PRIdLEAST16 |
Decimal placeholder string for a signed integer type with a width of at least 16 bits. | "d" |
PRIdLEAST32 |
Decimal placeholder string for a signed integer type with a width of at least 32 bits. | "ld" |
PRIdLEAST64 |
Decimal placeholder string for a signed integer type with a width of at least 64 bits, where supported. | "lld" |
PRIiLEAST8 |
Integer placeholder string for a signed integer type with a width of at least 8 bits. | "i" |
PRIiLEAST16 |
Integer placeholder string for a signed integer type with a width of at least 16 bits. | "i" |
PRIiLEAST32 |
Integer placeholder string for a signed integer type with a width of at least 32 bits. | "li" |
PRIiLEAST64 |
Integer placeholder string for a signed integer type with a width of at least 64 bits, where supported. | "lli" |
PRIdMAX |
Decimal placeholder string for a signed integer type with maximum width. | "lld" where 64-bit
integers are supported; "ld" otherwise |
PRIiMAX |
Integer placeholder string for a signed integer type with maximum width. | "lli" where 64-bit
integers are supported; "ld" otherwise |
PRIdPTR |
Decimal placeholder string for
intptr_t. |
"ld" |
PRIiPTR |
Integer placeholder string for
intptr_t . |
"li" |