next up previous contents
Next: Solution Up: Input and Output Previous: Input and Output

 

File IO

Write a program to open a new sequential file on unit 4 called marks.dat. The program should then read a student's name followed by his/her marks for four exams from the keyboard (the default unit) and write these to the file on a single line. Repeat the read/write process until a student with the name END is entered. Close the output file.

Go back to Notes gif




next up previous contents
Next: Solution Up: Input and Output Previous: Input and Output

©University of Liverpool, 1997
Thu May 29 10:11:26 BST 1997
Not for commercial use.