How does printf() actually work? Why
float f = 6635.543
printf("%10.2f", f);
and
printf("%2.2f", f");
Give the same answer?
What does the first number after % mean?
By default, missing characters are replaced with spaces, but zeros can also be specified: %06.2f
Width specifies the minimum field size, i.e. this is not a fixed size and can be larger if needed.
www.cplusplus.com/reference/cstdio/printf/?kw=printf