File read is happening even after end of file

Why it’s bad to use feof() to control a loop