SPRINTF - formatted output to a string.

(ANSI Standard)


#include <stdio.h>
i = sprintf( s, control [, arg1, arg2, ...] );


char *s;
is the string to which the output should be written.
const char *control;
is a "printf" control string.
arg1, arg2, ...
are the values to be output.
int i;
is the number of characters that were output. If a write error occurred, a negative number is returned.


"sprintf" writes to the string "s". "sprintf" converts, formats, and prints its arguments under control of the string "control". For a full description of the formatting used by "sprintf", see the documentation for "printf".

See Also:

expl c lib fopen

expl c lib fclose

expl c lib snprintf

Copyright © 2000, Thinkage Ltd.