Formatted i/o
The formatted i/o functions facilitate conversion between numeric values and their text representations, and should only be used when working with text data.
The printf-family of functions are used to perform formatted output, and the scanf-family of functions are used to perform formatted input. Unlike the other i/o methods, formatted i/o can be performed on both streams and strings, with special functions provided for the latter purpose.
All of the formatted i/o functions are also variadic–they accept a variable quantity of variably typed parameters following their last named parameter. The last named parameter, in this case, is a format string consisting of a mixture of plain text and conversion directives–each conversion directive refers to a specific argument in the variadic parameter list.