I'm looking at a code line similar to:
sprintf(buffer,"%02d:%02d:%02d",hour,minute,second);
I think the symbolic strings refer to the number of numeric characters displayed per hour, minute etc - or something like that, I am not entirely certain.
Normally I can figure this sort of thing out but I have been unable to find any useful reference searching "%02d %01d" on google. Anyone able to shed some light on this for me?
Instead of Googling for %02d
you should have been searching for sprintf()
function.
%02d
means "format the integer with 2 digits, left padding it with zeroes", so:
Format Data Result %02d 1 01 %02d 11 11
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With