CP1300 C++ Files

(Sections 9.?)
Last modified Tuesday, 05-Sep-2000 00:57:08 UTC.

Content


Self assessments


Tutorial Questions


Exam style questions

  1. Write a program that reads a file of float values, and writes out their total. The file name is "DataFile". You may not assume that the file exists, but you may assume that if it does exist it has the correct format, i.e., error checking is required only when the file is opened.
  2. Write a program that reads a file of integers stored in ASCII format, and writes them out to another file in binary format. The file names are provided as command line parameters.