fscanf
Format input from a file
The fscanf()
function parses the input from the opened file according to the specified format.
fscanf ( file , format , mixed )
parameter | describe |
---|---|
file | Required. Specify documents to be inspected. |
format | Required. Specified format. |
mixed | Optional. |
fscanf()
function is similar to sscanf()
, but it accepts input from the file associated with the file and interprets the input according to the specified format . If only two parameters are passed to this function, the parsed value will be returned as an array. Otherwise, if optional parameters are provided, this function returns the number of assigned values. Optional parameters must be passed with reference.