Why does the article use the term "trailing zeros", when the zeros are clearly *leading*? The article uses the example conversion specification "%05d" for the C library function printf. The printf manpage describes the format this way:
Each conversion specification is introduced by the % character, after which the following appear in sequence: ...
- Zero or more flags.
- An optional minimum field width.
- An optional precision.
- An optional length modifier.
- A conversion specifier.
The flag characters and their meanings are:...
0 For d, i, o, u, x, X, a, A, e, E, f, F, g, and G conversions, leading zeros are used to pad to the field width; no space padding is performed.