
The results are undefined if there are insufficient arguments for theįormat. Which shall result in the fetching of zero or more arguments. The format is composed of zero or moreĭirectives: ordinary characters, which are simply copied to the output stream, and conversion specifications, each of The format is aĬharacter string, beginning and ending in its initial shift state, if any. If copying takes place between objects that overlap as a result of a call to sprintf() or snprintf(), the resultsĮach of these functions converts, formats, and prints its arguments under control of the format.

Written at the end of the bytes actually written into the array. Otherwise, output bytes beyond the n-1st shall be discarded instead of being written to the array, and a null byte is

If n is zero, nothing shall be written and s may be a null pointer. The snprintf() function shall be equivalent to sprintf(), with the addition of the n argument which states The file associated with the file descriptor specified by the fildes argument rather than place output on a stream. '\0', in consecutive bytes starting at * s it is the user's responsibility to ensure that enough space isĭprintf() function shall be equivalent to the fprintf() function, except that dprintf() shall write output to The sprintf() function shall place output followed by the null byte, Output on the standard output stream stdout. The fprintf() function shall place output on the named output stream. AnyĬonflict between the requirements described here and the ISO C standard is unintentional.

) Įxcluding dprintf(): The functionality described on this reference page is aligned with the ISO C standard. Int sprintf(char *restrict s, const char *restrict format. Int snprintf(char *restrict s, size_t n , Int fprintf(FILE *restrict stream, const char *restrict format. Int dprintf(int fildes, const char *restrict format.
