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
Get step-by-step solutions from verified subject matter experts
