Formatting the Value of a Formatted C Input or Output Function

The behavior of the fprintf(), sprintf(), vfprintf(), vprintf() and vsprintf() functions is the same as the printf() function. The behavior of the fscanf() and sscanf() functions is the same as the scanf() function.

To control the format of the output use the flags, width and precision fields of the printf() function.

To control the format of the scanf() function use the * and width fields of the scanf() function. See ILE C/C++ Runtime Library Functions for information on these fields.