vscanf, vfscanf, and vsscanf

vprintf, vfprintf, vsprintf, and vsnprintf

#include <stdarg.h> #include <stdio.h> int vprintf(char *format, va_list arg_ptr); int vfprintf(FILE *stream, const char *format,              va_list arg_ptr); int vsprintf(char *buf, const char *format,              va_list arg_ptr); int vsnprintf(char * restrict buf, size_t num,               const char * restrict format,  va_list arg_ptr);

The functions vprintf( ), vfprintf( ), vsprintf( ), and vsnprint( ) are functionally equivalent to printf( ), fprintf( ), sprintf( ), and snprintf( ), respectively, except that the argument list has been replaced by a pointer to a list of arguments. This pointer must be of type va_list, which is defined in the header <stdarg.h>.

In C99, buf and format are qualified by restrict. The vsnprintf( ) function was added by C99.

Related functions are vscanf( ), vfscanf( ), vsscanf( ), va_arg( ), va_start( ), and va_end( ).




C(s)C++ Programmer's Reference
C Programming on the IBM PC (C Programmers Reference Guide Series)
ISBN: 0673462897
EAN: 2147483647
Year: 2002
Pages: 539

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net