The macros in following table expand to character string literals and can be used with
the scanf
family of functions when reading in signed integer
values.
Macro Name | Description | Value |
---|---|---|
SCNd8 |
Decimal placeholder string for a signed 8-bit integer type. | "hhd" |
SCNd16 |
Decimal placeholder string for a signed 16-bit integer type. | "hd" |
SCNd32 |
Decimal placeholder string for a signed 32-bit integer type. | "ld" |
SCNd64 |
Decimal placeholder string for a signed 64-bit integer type, where supported. | "lld" |
SCNi8 |
Integer placeholder string for a signed 8-bit integer type. | "hhi" |
SCNi16 |
Integer placeholder string for a signed 16-bit integer type. | "hi" |
SCNi32 |
Integer placeholder string for a signed 32-bit integer type. | "li" |
SCNi64 |
Integer placeholder string for a signed 64-bit integer type, where supported. | "lli" |
SCNdFAST8 |
Decimal placeholder string for the fastest signed integer type with a width of at least 8. | "hhd" |
SCNdFAST16 |
Decimal placeholder string for the fastest signed integer type with a width of at least 16. | "hd" |
SCNdFAST32 |
Decimal placeholder string for the fastest signed integer type with a width of at least 32. | "ld" |
SCNdFAST64 |
Decimal placeholder string for the fastest signed integer type with a width of at least 64, where supported. | "lld" |
SCNiFAST8 |
Integer placeholder string for the fastest signed integer type with a width of at least 8 bits. | "hhi" |
SCNiFAST16 |
Integer placeholder string for the fastest signed integer type with a width of at least 16. | "hi" |
SCNiFAST32 |
Integer placeholder string for the fastest signed integer type with a width of at least 32. | "li" |
SCNiFAST64 |
Integer placeholder string for the fastest signed integer type with a width of at least 64, where supported. | "lli" |
SCNdLEAST8 |
Decimal placeholder string for a signed integer type with a width of at least 8 bits. | "hhd" |
SCNdLEAST16 |
Decimal placeholder string for a signed integer type with a width of at least 16 bits. | "hd" |
SCNdLEAST32 |
Decimal placeholder string for a signed integer type with a width of at least 32 bits. | "ld" |
SCNdLEAST64 |
Decimal placeholder string for a signed integer type with a width of at least 64 bits, where supported. | "lld" |
SCNiLEAST8 |
Integer placeholder string for a signed integer type with a width of at least 8 bits. | "hhi" |
SCNiLEAST16 |
Integer placeholder string for a signed integer type with a width of at least 16 bits. | "hi" |
SCNiLEAST32 |
Integer placeholder string for a signed integer type with a width of at least 32 bits. | "li" |
SCNiLEAST64 |
Integer placeholder string for a signed integer type with a width of at least 64 bits, where supported. | "lli" |
SCNdMAX |
Decimal placeholder string for a signed integer type with maximum width. | "lld" where 64-bit
integers are supported; "ld" otherwise |
SCNiMAX |
Integer placeholder string for a signed integer type with maximum width. | "lli" where 64-bit
integers are supported; "ld" otherwise |
SCNdPTR |
Decimal placeholder string for
intptr_t . |
"ld" |
SCNiPTR |
Integer placeholder string for
intptr_t . |
"li" |