I. vfprintf
Function Name: vfprintf
Function: formatted data is output to the specified data stream.
Usage: int vfprintf (File * stream, char * format, va_list PARAM );
Function Description: vfprintf () will convert and format the data according to the format string, and then output the result to the file specified by the parameter stream until the string ends ('/0 ') so far. For the format of the format string, see printf ().
Return Value: the number of actual output characters is returned if the request is successful, and-1 is returned if the request fails. The error cause is stored in errno.
Program example:
File * FP; <br/> int vfpf (char * FMT ,...) <br/>{< br/> va_list argptr; <br/> int CNT; <br/> va_start (argptr, FMT); <br/> CNT = vfprintf (FP, FMT, argptr); <br/> va_end (argptr); <br/> return (CNT); <br/>}< br/> int main (void) <br/>{< br/> int inumber = 30; <br/> float fnumber = 90.0; <br/> char string [4] = "ABC "; <br/> fp = tmpfile (); <br/> If (FP = NULL) <br/> {<br/> perror ("tmpfile () call "); <br/> exit (1); <br/>}
Ii. vprintf Functions
Function Name: vprintf
Function: Send formatted output to stdout.
Usage: int vprintf (char * format, va_list PARAM );
Iii. vsprintf Functions
Function: Send formatted output to the string
Usage: int vsprintf (char * string, char * format, va_list PARAM );