> Oh, I don't know why you use fscanf == 4, perhaps to check whether you have scanned all the data, a better method i believe would be != EOF.
Except that 4 is a positive assertion of success, not a...