| 宏 | 描述 | 示例 |
|---|---|---|
PRIxMAX | 用于 intmax_t 的 printf 格式说明符 | PRIiMAX 等同于用于 intmax_t 值的 i (在 "%i" 中) |
PRIxN | 用于 intN_t 的 printf 格式说明符 | PRId16 等同于用于 int16_t 值的 d (在 "%d" 中) |
PRIxLEASTN | 用于 int_leastN_t 的 printf 格式说明符 | PRIuLEAST32 等同于用于 uint32_t 值的 u (在 "%u" 中) |
PRIxFASTN | 用于 int_fastN_t 的 printf 格式说明符 | PRIxFAST8 等同于用于 uint8_t 值的 x (在 "%x" 中) |
PRIxPTR | 用于 intptr_t 的 printf 格式说明符 | PRIuPTR 等同于用于 uintptr_t 值的 u (在 "%u" 中) |
SCNxMAX | 用于 intmax_t 的 scanf 格式说明符 | SCNiMAX 等同于用于 intmax_t 值的 i (在 "%i" 中) |
SCNxN | 用于 intN_t 的 scanf 格式说明符 | SCNd16 等同于用于 int16_t 值的 d (在 "%d" 中) |
SCNxLEASTN | 用于 int_leastN_t 的 scanf 格式说明符 | SCNuLEAST32 等同于用于 uint32_t 值的 u (在 "%u" 中) |
SCNxFASTN | 用于 int_fastN_t 的 scanf 格式说明符 | SCNxFAST8 等同于用于 uint8_t 值的 x (在 "%x" 中) |
SCNxPTR | 用于 intptr_t 的 scanf 格式说明符 | SCNuPTR 等同于用于 uintptr_t 值的 u (在 "%u" 中) |
i 和 d,说明符假定类型为有符号;对于 o、u、x 和 X,则假定为无符号。| 函数 | 描述 |
|---|---|
| imaxabs | 等同于用于 intmax_t 的 absintmax_t imaxabs (intmax_t n); |
| imaxdiv | 等同于用于 intmax_t 的 divimaxdiv_t imaxdiv (intmax_t numer, intmax_t denom); |
| strtoimax | 等同于用于 intmax_t 的 strtolintmax_t strtoimax (const char* str, char** endptr, int base); |
| strtoumax | 等同于用于 uintmax_t 的 strtouluintmax_t strtoumax (const char* str, char** endptr, int base); |
| wcstoimax | 等同于用于 intmax_t 的 wcstolintmax_t wcstoimax (const wchar_t* wcs, wchar_t** endptr, int base); |
| wcstoumax | 等同于用于 uintmax_t 的 wcstouluintmax_t wcstoumax (const wchar_t* wcs, wchar_t** endptr, int base); |
| 类型 | 描述 |
|---|---|
| imaxdiv_t | 由 imaxdiv 返回的类型,它等同于用于 intmax_t 的 div_t。 |
|
|
Please, enter a number: 10 Thanks for entering 10. Please, enter another number: 20 10 by 20 is 200 |