Table of Contents
Previous Section Next Section

vscanf, vfscanf, and vsscanf

#include <stdarg.h>#include <stdio.h>
int vscanf(char * restrict format, va_list arg_ptr);
int vfscanf(FILE * restrict stream, const char * restrict format,
            va_list arg_ptr);
int vsscanf(char * restrict buf, const char * restrict format,
            va_list arg_ptr);

These functions were added by C99.

The functions vscanf( ), vfscanf( ), and vsscanf( ) are functionally equivalent to scanf( ), fscanf( ), and sscanf( ), 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>.

Related functions are vprintf( ), vfprintf( ), vsprintf( ), va_arg( ), va_start( ), and va_end( ).


Table of Contents
Previous Section Next Section