For example, the display time: 05: 01: 05
using the format control is:% 02d:% 02d:% 02d
where: 0 is represented by 0 filled; 2 represents two bits of data; D represents an integer
sprintf printf output data of a fixed format - the number before the zero padding
Guess you like
Origin www.cnblogs.com/panfengyou/p/12632491.html
Recommended
Ranking