|
||
int sprintf( char *buf, char *fmt, ... )
char *buf; /* character buffer to receive output */ char *fmt; /* format string */
|
|
|
Synopsis |
#include "stdio.h"
The sprintf function writes text to the character array at buf according to format string fmt . Arguments following fmt are formatted and printed in the output string.
|
|
Parameters |
buf is the address of a character buffer that is to receive the output string. fmt is a null-terminated string containing format conversion specifications.
|
|
Return Value |
sprintf returns the length of the string copied into buf .
|
|
Comments |
The types of arguments must match those expected by the format specifiers in fmt , and the number of arguments must be greater than or equal to the number of specifiers in fmt ; otherwise, the result of sprintf is undefined.
|
|
See Also |
fprintf for a description of format specifiers acceptable to sprintf . printf and ss_command and related functions.
|
|
|
|