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...
Consider the following security measures for airline travel. A list of names of people who are not allowed to fly is maintained by the government and given to the airlines; people whose names are on the list are not allowed to make flight reservations. Before entering the departure area of the airport, passengers go through a security check where they have to present a government-issued ID and a
boarding pass. Before boarding a flight, passengers must present a boarding pass, which is scanned to verify the reservation. Show how some one who is on the no-fly list can manage to fly provided boarding passes can be printed online. Which additional security measures should be implemented in order to eliminate this vulnerability? What will be an ideal response?
Of the many options for producing black and white from color, which is considered the best method for producing the best result?
A. Grayscale changes B. Black & White adjustment C. Color Options D. Color Picker dialog box