To open a file for read-write and random access requires

a) The usual definition of an ofstream or ifstream object.
b) A call to open ofstream or ifstream object, but there must be a second argument to the open function.
c) The stream to be defined using the class fstream. defined in the header file.
d) The stream to be connected to the physical file object with first argument a C-string containing the physical file name and a second argument, ios::in | ios::out that specifies that the i/o with the file should be for either reading or writing.
e) ```
#include, using std::fstream; and using std::ios;
```


a) The usual definition of an ofstream or ifstream object.

a) only defines an output stream or an input stream, respectively. b) is in error because the stream should be fstream and because the answer fails to specify the second argument for open().

Computer Science & Information Technology

You might also like to view...

After entering a GoogleLookup formula, Google Spreadsheets momentarily displays the word "____________________" until it evaluates the formula to determine the value to display in that cell.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Explain two practical guidelines to follow in risk treatment strategy selection.

What will be an ideal response?

Computer Science & Information Technology

Which of the following is a common LAN protocol used for a SOHO?

A. ATM B. DSL C. Ethernet D. HDLC

Computer Science & Information Technology

To change the tab order, you use the Tab Order dialog box in the:

A) Tools tab when working in Design view. B) Tools tab when working in Layout view. C) Arrange tab when working in Layout view. D) Arrange tab when working in Design view.

Computer Science & Information Technology