Question: fscanf how does it work?
Answer: The fscanf() function is used to read formatted input from the file. It works just like scanf() function but instead of reading data from the standard input it reads the data from the file. ... On success, this function returns the number of values read and on error or end of the file it returns EOF or -1 .