I am studying about printf
and sprintf
and I don't understand a few points. Can someone please help me understand the following format
specifiers explained at sprintf()
:
An optional alignment specifier that says if the result should be left-justified or right-justified. The default is right-justified; a - character here will make it left-justified.
An optional number, a width specifier that says how many characters (minimum) this conversion should result in.