Fscanf() Function in C Programming Language

Fscanf() in C


C Language: fscanf function
(Formatted File Read)

In the C Programming Language, the fscanf function reads formatted output from stream.

Syntax

The syntax for the fscanf function in the C Language is:

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

Parameters or Arguments

stream

The stream where the output will be read.

format

Describes the input as well as provides a placeholder to insert the formatted string. Here are a few examples: