while (!inputFile.EOF) loops shows the correct way to read data from the file until the end of the file is reached.
b. while (!inputFile.EOF)
Explanation:
Normally to read an input files as loop the program reads till end of file mark been seen. A loop been executed till an EOF is reached.
End user has to write a logic in software languages which should have a loop and ready a bit or set of bits which depends of end user technology and stop reading till end of file which is called EOF = true.
If EOF is not true then end user program loop never ends and program is either hang or bug or goes to really task.
End user has check either EOF = True or files size reach to end of bytes. Whichever comes first.
Otherwise if EOF is not true then it is corrupted files.