Scan Format Macros for Unsigned Integers

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

Macro Name Description Value
SCNo8 Octal placeholder string for an unsigned 8-bit integer type. "hho"
SCNo16 Octal placeholder string for an unsigned 16-bit integer type. "ho"
SCNo32 Octal placeholder string for an unsigned 32-bit integer type. "lo"
SCNo64 Octal placeholder string for an unsigned 64-bit integer type, where supported. "llo"
SCNu8 Unsigned placeholder string for an unsigned 8-bit integer type. "hhu"
SCNu16 Unsigned placeholder string for an unsigned 16-bit integer type. "hu"
SCNu32 Unsigned placeholder string for an unsigned 32-bit integer type. "lu"
SCNu64 Unsigned placeholder string for an unsigned 64-bit integer type, where supported. "llu"
SCNx8 Hexadecimal placeholder string for an unsigned 8-bit integer type. "hhx"
SCNx16 Hexadecimal placeholder string for an unsigned 16-bit integer type. "hx"
SCNx32 Hexadecimal placeholder string for an unsigned 32-bit integer type. "lx"
SCNx64 Hexadecimal placeholder string for an unsigned 64-bit integer type, where supported. "llx"
SCNoFAST8 Octal placeholder string for the fastest signed integer type with a width of at least 8. "hho"
SCNoFAST16 Octal placeholder string for the fastest signed integer type with a width of at least 16. "ho"
SCNoFAST32 Octal placeholder string for the fastest signed integer type with a width of at least 32. "lo"
SCNoFAST64 Octal placeholder string for the fastest signed integer type with a width of at least 64, where supported. "llo"
SCNuFAST8 Unsigned placeholder string for the fastest signed integer type with a width of at least 8 bits. "hhu"
SCNuFAST16 Unsigned placeholder string for the fastest signed integer type with a width of at least 16. "hu"
SCNuFAST32 Unsigned placeholder string for the fastest signed integer type with a width of at least 32. "lu"
SCNuFAST64 Unsigned placeholder string for the fastest signed integer type with a width of at least 64, where supported. "llu"
SCNxFAST8 Hexadecimal placeholder string for the fastest signed integer type with a width of at least 8. "hhx"
SCNxFAST16 Hexadecimal placeholder string for the fastest signed integer type with a width of at least 16. "hx"
SCNxFAST32 Hexadecimal placeholder string for the fastest signed integer type with a width of at least 32. "lx"
SCNxFAST64 Octal placeholder string for the fastest signed integer type with a width of at least 64, where supported. "llx"
SCNoLEAST8 Octal placeholder string for a signed integer type with a width of at least 8 bits. "hho"
SCNoLEAST16 Octal placeholder string for a signed integer type with a width of at least 16 bits. "ho"
SCNoLEAST32 Octal placeholder string for a signed integer type with a width of at least 32 bits. "lo"
SCNoLEAST64 Octal placeholder string for a signed integer type with a width of at least 64 bits, where supported. "llo"
SCNuLEAST8 Unsigned placeholder string for a signed integer type with a width of at least 8 bits. "hhu"
SCNuLEAST16 Unsigned placeholder string for a signed integer type with a width of at least 16 bits. "hu"
SCNuLEAST32 Unsigned placeholder string for a signed integer type with a width of at least 32 bits. "lu"
SCNuLEAST64 Unsigned placeholder string for a signed integer type with a width of at least 64 bits, where supported. "llu"
SCNoMAX Octal placeholder string for a signed integer type with maximum width. "llo"where 64-bit integers are supported; "lo" otherwise
SCNuMAX Unsigned placeholder string for a signed integer type with maximum width. "llu"where 64-bit integers are supported; "lu" otherwise
SCNxMAX/SCNXMAX Hexadecimal placeholder string for a signed integer type with maximum width. "llx"/"llX" where 64-bit integers are supported; "lx"/"lX" otherwise
SCNoPTR Octal placeholder string for uintptr_t. "lo"
SCNuPTR Unsigned placeholder string for uintptr_t. "lu"
SCNxPTR/SCNXPTR Hexadecimal placeholder string for uintptr_t. "lx"/"lX"