Formats data under control of the format control string, using a variable argument list.
#include <stdio.h> int vsprintf ( char *buf, const char *format, va_list arg);
(OUT) Points to the buffer to which to write the result.
(IN) Points to the format control string. See Print Format Control Strings.
(IN) Specifies a variable argument list for conversion specifiers. The number of arguments in the list is determined by the format string.
If successful, returns the number of characters written into the array, not counting the null-terminating character. Otherwise, returns a negative value and sets errno to one of the following:
The vsprintf function formats data under control of the format control string and writes the result to buf. The vsprintf function is equivalent to sprintf, with the variable arguments replaced with arg, which has been initialized by the va_start macro.