feof() returns true only AFTER a read function has returned EOF
Thanks Salem.