string format definition
printf () function
The printf () function is a formatted output function that is generally used to output information in a prescribed format to a standard output device. This function is often used when writing programs. The call format for the printf () function is:
printf ("< format string >", < Parameter table >);
The format string consists of two parts: part of the normal character, and the characters are output as is; The other part is formatting the specified character, starting with "%" followed by one or more specified characters to determine the format of the output content.
Parameter table is a series of parameters that need to be output, the number must be the same as the number of output parameters described in the format string, the parameters are separated by "," and the order one by one corresponds, otherwise there will be unexpected errors.
form of format-string:%[flags][width]. [Precision] [{h|l|i|232|264}] Type
[Flags]----->{-, +, 0, #, blank}
Left align, sign, complement 0, output front plus space
[Width]-----Minimum number of characters for output >
[Precision]----->
{c,c: no impact.
{d,i,u,o,x,x: The minimum number of characters to output, if not enough, in front of the 0.
{f: Specify '. ' The number of characters to output, if precision is 0 or none, then no decimal.
{s,s: The maximum number of output characters, the default output to null end.
[{h|...| 264}]----> Specify the size of the following parameters.