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”.

Computer Science & Information Technology

You might also like to view...

A 13-15-15-28 memory chip is faster than a 16-16-16-39 memory chip

Indicate whether the statement is true or false

Computer Science & Information Technology

Which of the following statements is not valid C++ code?

A) int ptr = &num1; B) int ptr = int *num1; C) float num1 = &ptr2; D) All of the above are valid. E) All of the above are invalid.

Computer Science & Information Technology