printf Format String

Top 

 

The format string shall be present in each of the printf function calls. It controls how each function will convert, format, and print its arguments. The format string is a character string that contains two types of objects:

   Plain characters are copied verbatim to the output stream.

   Conversion specifications fetch arguments from the argument list and apply formatting to them.

Plain characters are just copied verbatim to the output stream. Conversion specifications fetch arguments from the argument list and apply formatting to them.

Note. There must be enough arguments for the format; if not, the results will be unpredictable and possibly disastrous. Excess arguments (more than required by the format) are ignored.