fscanf


Read and interpret data from stream

Remark

These functions are not supported by the debugging functions which CS+ provides.

[Classification]

Standard library

[Syntax]

#include <stdio.h>

int fscanf(FILE *stream, const char *format[, arg, ...]);

[Return value]

The number of input fields for which scanning, conversion, and storage were executed normally is returned. The return value does not include scanned fields that were not stored. If an attempt is made to read to the end of the file, the return value is EOF. If no field was stored, the return value is 0.

[Description]

Reads the input to be converted according to the format specified by the character string pointed to by format from stream and treats the arg arguments that follow format as objects for storing the converted input. Only the standard input/output stdin can be specified for stream. The method of specifying format is the same as described for the sscanf function.