Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Why does the C language print format printf("%.4d ",123) output 0 123?
Why does the C language print format printf("%.4d ",123) output 0 123?
Equivalent to printf("%04d ",123).

It means to output 4-bit shaping.

%04d means that when the number is less than 4 digits, it will be preceded by 0, making its total width 4 digits.

Remember, you can check the format of msdn's printf in detail.