%-d , . :
printf (" %d\n", -1977);
print(3) :
- The converted value is to be left adjusted on the field bound‐
ary. (The default is right justification.) Except for n con‐
versions, the converted value is padded on the right with
blanks, rather than on the left with blanks or zeros. A - over‐
rides a 0 if both are given.
Update0
: , +, . :
+ A sign (+ or -) should always be placed before a number produced
by a signed conversion. By default a sign is used only for neg‐
ative numbers. A + overrides a space if both are used.
( printf ):
matt@stanley:~/cpfs$ printf "%+d\n" 3
+3
matt@stanley:~/cpfs$ printf "%+d\n" -3
-3
matt@stanley:~/cpfs$ printf "%+u\n" -3
18446744073709551613
, , %u.