Read complete record pairs and reject partial conversions

scores.txt contains zero to 100 whitespace-separated pairs id score, with id in 1..9999 and score in 0..100; all numeric lexemes passed to %d are representable as int. IDs need not be unique. Write a reader reporting records=k passed=p sum=s, where a score of 40 or more passes. Reject a malformed token, an incomplete final pair, excess records or invalid field with invalid records. Explain the difference between fscanf returning 2, 1, 0 and EOF. Whitespace defines records here: a pair may cross a line boundary; this is not a per-line parser.


