标签: c printf
假设如下:
sizeof(char) = 1 sizeof(short) = 2 sizeof(int) = 4 sizeof(long) = 8
2字节有符号数的printf格式为%hd,4字节有符号数为%d,8字节有符号数为%ld,但1字节有符号数的正确格式是什么?
printf
%hd
%d
%ld