printf 与c的基本类型之间的关系
型 | 書式 | 注意事項 |
ssize_t | %zd | |
size_t | %zu | |
intmax_t | %jd | |
uintmax_t | %ju | |
ptrdiff_t | %t | |
signed char | %hhd | |
unsigned char | %hhu | |
short int | %hd | |
unsigned short int | %hu | |
int | %d | |
unsigned int | %u | |
long int | %ld | |
unsigned long int | %lu | |
long long int | %lld | |
unsigned long long int | %llu | |
int32_t | %PRId32 | 以下,#include <inttypes.h> が必要(下記参照) |
uint32_t | %PRIu32 | |
int64_t | %PRId64 | |
uint64_t | %PRIu64 |
本文来自博客园,作者:aspirant,转载请注明原文链接:https://www.cnblogs.com/aspirant/p/3638510.html