A file stream, fStr, is open and attached to physical file.txt. To reset this file stream so that the file can be read again starting at the first line requires
a. “File stream fStr, reset yourself to the start of the file.”.
b. Calling the reset() member function using fStr as the calling object but with no argument.
c. With calling object fStr call close()then call open( ) with argument “fStr”.
d. Only calling the member function open() using fStr as the calling object with the “file.txt” as argument.
e. None of the above. You can’t reread lines of a file that have already been read.
Part c) Close the file and reopen it.
Explanation: Part a) is only a C-string, not a member function of fstream. Part b) There is no reset() member of fstream. d) It is an error to call open() with an already open file stream object. Part e) not true.
You might also like to view...
Answer the following statements true (T) or false (F)
1) Event delegates can contain any method. 2) In order to create an event you must click on the event icon in the properties window. 3) By looking up ControlName class and clicking the events section, you can find out all the events and the parameters a control has. 4) You can use the Tab property to determine the order in which tabbing will occur.
You may want to combine an illustration with another type of ____________________.
Fill in the blank(s) with the appropriate word(s).
The ____________________ process group is responsible for printing the final reports used to analyze the performance of the project.
Fill in the blank(s) with the appropriate word(s).
After an NPS server receives an Access-Request message, what message does it reply with to tell the client that access is granted?
A. Access-Granted B. Access-Token C. Access-Enabled D. Access-Accept