Yes you're correct.
However, remember that EOF() is actually a function included with most high-level languages. For example in VB it examines the current position of the pointer to the file indicated by the file number parameter to see if its end has been reached and then returns true or false accordingly. I mention this because you can't strictly expect this function to exist when writing algorithms.
In the exam it would be better to write WHILE Not end of file... rather than EOF or use some other technique, such as a sentinel. Obviously it largely depends on the question.
However, remember that EOF() is actually a function included with most high-level languages. For example in VB it examines the current position of the pointer to the file indicated by the file number parameter to see if its end has been reached and then returns true or false accordingly. I mention this because you can't strictly expect this function to exist when writing algorithms.
In the exam it would be better to write WHILE Not end of file... rather than EOF or use some other technique, such as a sentinel. Obviously it largely depends on the question.