|
|
1.1 ! root 1: ! 2: ! 3: sprintf() STDIO sprintf() ! 4: ! 5: ! 6: ! 7: ! 8: Format output ! 9: ! 10: #include <stdio.h> ! 11: iinntt sspprriinnttff(_s_t_r_i_n_g, _f_o_r_m_a_t [ , _a_r_g ] ...) ! 12: cchhaarr *_s_t_r_i_n_g, *_f_o_r_m_a_t; ! 13: ! 14: sprintf formats and prints a string. It resembles the function ! 15: printf, except that it writes its output into the memory location ! 16: pointed to by string, instead of to the standard output. ! 17: ! 18: sprintf reads the string pointed to by format to specify an out- ! 19: put format for each arg; it then writes every arg into string, ! 20: which it ends with a null character. For a detailed discussion ! 21: of sprintf's formatting codes, see printf. ! 22: ! 23: ***** Example ***** ! 24: ! 25: For an example of this function, see the entry for ssssccaannff. ! 26: ! 27: ***** See Also ***** ! 28: ! 29: printf(), fprintf(), STDIO ! 30: ! 31: ***** Notes ***** ! 32: ! 33: The output string passed to sprintf must be large enough to hold ! 34: all output characters. ! 35: ! 36: Because C does not perform type checking, it is essential that ! 37: each argument match its format specification. ! 38: ! 39: At present, sspprriinnttff does not return a meaningful value. ! 40: ! 41: ! 42: ! 43: ! 44: ! 45: ! 46: ! 47: ! 48: ! 49: ! 50: ! 51: ! 52: ! 53: ! 54: ! 55: ! 56: ! 57: ! 58: ! 59: ! 60: ! 61: ! 62: ! 63: ! 64: COHERENT Lexicon Page 1 ! 65: ! 66:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.