

sprintf()                     STDIO                     sprintf()




Format output

#include <stdio.h>
iinntt sspprriinnttff(_s_t_r_i_n_g, _f_o_r_m_a_t [ , _a_r_g ] ...)
cchhaarr *_s_t_r_i_n_g, *_f_o_r_m_a_t;

sprintf formats  and prints a string.   It resembles the function
printf, except that it writes its output into the memory location
pointed to by string, instead of to the standard output.

sprintf reads the string pointed  to by format to specify an out-
put format  for each arg;  it then writes every  arg into string,
which it  ends with a null character.   For a detailed discussion
of sprintf's formatting codes, see printf.

***** Example *****

For an example of this function, see the entry for ssssccaannff.

***** See Also *****

printf(), fprintf(), STDIO

***** Notes *****

The output string passed to  sprintf must be large enough to hold
all output characters.

Because C  does not perform type checking,   it is essential that
each argument match its format specification.

At present, sspprriinnttff does not return a meaningful value.
























COHERENT Lexicon                                           Page 1


