I understand... so 0 is used to specify the pad when you put just the width, right? like "%03d". When you use width.precision, the precision of the integer will be always padded with 0s...
So, there is no need for "%02.2d" because .2 will guarantee that the result is shorter than the precision it will be padded with 0s. Am i right?
Code:
sprintf(msg, "%05d",10); //[00010]
sprintf(msg, "%5d",10); //[ 10]
sprintf(msg, "%05.5d",10); //[00010] No reason for 0, because .5 will pad with 0's, right?
sprintf(msg, "%5.5d",10); //[00010]
Thank you for your answer!