If you use fread to read a file of unknown size with a set buffer size of say 500 bytes, when you get to the end of the file you are likely to read a stub of 500 bytes of info and the eof marker.
And fread will not read that block and set and oef that can be read with feof. That is how I understand, so we can either use fseek to discover the file size and fread accordingly or use fstat?
Is this the proper approach?