Seeking simply does not test for the file's end.
The reason for this is that you perhaps might want to do an fwrite()
where you sought to. fseek()
can not know what your plans are for after it was called.
Do an fread()
after seeking behind the file's end and you will have feof()
returning a non-zero value.