Formatted string output
The functions in this section are for formatted output of strings to streams. They are generally quite safe to use.
Formatted output is textual output via functions such as
fprintf. These take as an argument a string containing
special character sequences such as
%d (which indicates that an
integer argument will follow). After this string, other arguments that
correspond to the special character sequences follow. When the
functions combine these arguments, the result is formatted textual
The next several sections discuss four formatted output functions. The
printf, prints to standard output. The
fprintf function is a high-level routine that sends its output to
sprintf "prints" to a string, and
a safer way of printing to a string.