ordinary multibyte characters are copied unchanged to the output
conversion specifications are begun with % and consist of
- left-justify
+ number is printed with a sign
space prefixes space to beginning if there is no sign
# "alternate form" -- with o, increases precision so first
digit is zero; for x, prefixes "0x"; for e, E, f, g, G,
always puts decimal, even if no fractional part; for g and G,
trailing zeros are not removed
0 leading zeros are used to pad, rather than spaces
h short l,L long
d, i int, signed decimal
o int, unsigned octal
x, X int, unsigned hexadecimal
u int, unsigned decimal
c int, single character after conversion to unsigned char
s char *, characters from string are printed until '\0'
is reached or precision characters have been printed
f double, decimal notation, default precision 6
e, E double, scientific notation, default precision 6
g, G double, uses scientific notation if exponent is less
than -4 or greater than or equal to the precision,
uses decimal notation otherwise
p void *, pointer (representation implementation-dependent)
% no conversion, just print a '%'
n this argument gives a pointer to an integer, and printf
writes to this integer the number of characters written
to the output stream so far. no conversion