Question: 1. Which statement opens a file in such a way that information will only be written to its end? a. dataFile(open.append(info.dat)); b. dataFile.open(info.dat, ios::out |

1. Which statement opens a file in such a way that information will only be written to its end?

a.

dataFile(open.append("info.dat"));

b.

dataFile.open("info.dat", ios::out | ios::app);

c.

dataFile.open = "C:\\info.dat" ios:append;

d.

open(dataFile.append);

e.

None of these

2. Closing a file causes any unsaved information still held in the file buffer to be

a.

saved to the file.

b.

deleted.

c.

retained in the buffer for safekeeping.

d.

duplicated.

e.

None of these

3. The end-of-file marker is automatically written:

a.

when a file is opened with ios::eof

b.

when a file is opened with ios::app

c.

when a file is closed

d.

when the program ends

e.

None of these

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!