1.等号后面为简写
short int = short
long int = long
unsigned int = unsigned
long long int = long long
unsigned short int = unsigned short
unsigned long int = unsigned long
signed short = short
signed short int = short int
2.%d 用以显示十进制数;
%o 用于显示八进制数;
%x 用以显示十六进制数;
%#o,%#x,%#X分别生成0,0x,0X前缀;
%u 用以显示unsigned int 类型的数值;
long常量:7L,020L,0x10L;
long long常量:3LL,0100LL,0x98LL;
unsigned long long常量:5ull,10LLU,9Ull,36ULL
%ld 用以显示long类型数值;
%lo 用以显示八进制long类型数值;
%lx 用以显示十六进制long类型数值;
%hd 用以显示十进制short类型数值;
%ho 用以显示八进制short类型数值;
%hx 用以显示十六进制short类型数值;
%lu 用以显示十进制unsigned long 类型数值;
%lld 用以显示十进制long long 类型数值;
%llu 用以显示十进制unsigned long long 类型数值;
3.float类型 至少能表示6位有效数字,2.3f,9.11E9F
double类型 至少能表示10位有效数字,无后缀。
long double类型 54.3L,4.32E4L
%f 显示十进制计数法的float和double类型数值
%e 显示指数计数法的float和double类型数值
%Lf,%Le显示long double类型数值