Write text in specified format to character string
int vsprintf(char *s, const char *format, va_list arg);
The number of characters that were output (excluding the null character (\0)) is returned.
This function applies the format specified by the string pointed to by format to the argument string pointed to by arg, and outputs the formatted data that was output as a result to the array pointed to be s. The vsprintf function is equivalent to sprintf with the list of a variable number of real arguments replaced by arg. arg must be initialized by the va_start macro before the vsprintf function is called.