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.
c) With calling object fStr call close()then call open( ) with argument “fStr”.
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...
An empty table does not contain any fields.
Answer the following statement true (T) or false (F)
Referring to the accompanying figure, which of the following layouts prints blank lines to the right of each slide?
A. 3 slides B. 2 slides C. 4 slides D. 6 slides
For each of the following scenarios, which is the most appropriate interviewing technique. Give a rationale for each answer.
a. Office manager whose main responsibilities are ordering supplies, tracking in-house inventory and maintaining time sheets. This person has a private office and spends most of each day in that office carrying out these responsibilities b. Teenager searching the Web looking for the best joystick for a new computer. c. Surgeon performing an operation. The surgical team is very busy performing operations during the week and can only see you for two hours on Saturday mornings. d. Academic advisor who is staffing the advising hot line during daily afternoon advising hours. e. Student using a new Web-based registration system. f. Air traffic controllers running Arrival and Departure Control at O’Hare Airport and who work in very cramped quarters.
There can be ____________ definition(s) of a function template of a given name in a program.
a. one b. two c. ten d. as many as declared e. as many as there are room for in memory