总结了一下C语言里printf中输出的参数

int C programming language, the output pattern in printf

%d print as decimalinteger
%6d print as decimal integer, at least 6 characters wide
%f print as floating point
%6f print as floating point, at least 6 characters wide
%.2f print as floating point, 2 hcaracters after decimal point
%6.2f print as floating point, at least 6 wide and 2 after decimal point

%o print the octal pattern of the number(in decimal).
%x print the hexadecimal pattern of the number.
%c print the character of the number, like 33 is !
%s print string
%% print % itself.
%ld print long integer

你可能感兴趣的:(C++,c,C#,F#,D语言)