Table of Contents        Previous topic       Next topic       

C COMPILER LIBRARY FUNCTIONS->Detailed Descriptions->fscanf()


#include <stdio.h>

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


streamPointer to FILE structure
formatFormat control string
...Arguments to receive scanned data


This function reads formatted data from the current position of stream and assigns converted values to subsequent arguments, each of which must be a pointer.  The function returns when format is exhausted.

The format control string has the same form and function as the format argument of the scanf() function.

Return Value

The function returns the number of fields successfully converted and assigned.