Why is the ifstream parameter of the readdata procedure in


Complete the following questions: 

  1. Write C++ code to open a document with the name Hello.txt, place the message "Hello, World!" in the document, and exit the document.  Re open the file you closed, and read the message into a string variable. Exit out of the file.
  2. When do you open the file as an ifstream, as an ofstream, or as an fstream? Could you simply open all files as an fstream?
  3. Why is the ifstream parameter of the read_data procedure in the previous question a reference parameter and not a value parameter?
  4. What is the difference between a text file, and a binary file?

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Why is the ifstream parameter of the readdata procedure in
Reference No:- TGS01586759

Now Priced at $20 (50% Discount)

Recommended (97%)

Rated (4.9/5)