If line 12 opens the file successfully, the program begins processing data. Lines 21–22 prompt the user to enter either the various fields for each record or the end-of-file indicator when data entry is complete. Figure 14.5 lists the keyboard combinations for entering end-of-file for various computer systems.
Line 29 extracts each set of data and determines whether end-of-file has been entered. When end-of-file is encountered or bad data is entered,
operator void * returns the null pointer (which converts to the
false) and the
while statement terminates. The user enters end-of-file ...