This will print the value in at least 0 (first 0!) columns ...
Aha, a rare Richard Heathfield error!
In a printf conversion, the "0" character is a *flag*, not a field
width, unless:
- you are already working on a field width, or
- you are already working on a precision
(and possibly if you use various extensions as well). For instance,
printf("%040d\n", 12);
prints "0000000000000000000000000000000000000012\n", while:
printf ("%40d\n", 12);
prints " 12\n".
A zero flag is allowed with %f conversions, with the obvious meaning
(so printing 0.5 with %012.6f produces "00000.500000"; note that the
field width includes the decimal-point character).
but possibly more, and with a precision of 0 (second 0) decimal
places.
Note that, for %f format, if no precision is specified, a default
value of 6 is assumed. So:
printf("%f\n", val);
and:
printf("%.6f\n", val);
have identical meanings.