As you can see from the code snippet below, I have declared one char
variable and one int
variable. When the code gets compiled, it must identify t
The first parameter is a format string. If you're printing a decimal number, it may look like:
"%d"
(decimal number)"%5d"
(decimal number padded to width 5 with spaces)"%05d"
(decimal number padded to width 5 with zeros)"%+d"
(decimal number, always with a sign)"Value: %d\n"
(some content before/after the number)etc, see for example Format placeholders on Wikipedia to have an idea what format strings can contain.
Also there can be more than one parameter here:
"%s - %d"
(a string, then some content, then a number)