Homework Questions? Ask a Tutor for Answers ASAP
I have only 45 mins to complete this.
1. (TCO 13) _____ are files to which data is written. (Points : 3) Output files Input files Active files Sequential files 2. (TCO 13) Sometimes, a project will need to save data inputted by the user so it can be used again. This data stored will later be accessed from a _____. (Points : 3) program file project file data file user file 3. (TCO 13) Once you finish using a file, you should _____. (Points : 3) append it exit it output it None of the above 4. (TCO 13) Text files are what type of file? (Points : 3) Sequential Random access Binary Consecutive 5. (TCO 13) What do the following statements accomplish? ifstream theFile; theFile.open( myFile.txt , ios::cur); (Points : 3) Opens myFile in read mode Opens myFile in current mode Calculates the offset from current file pointer Calculates the offset from the current mode 6. (TCO 13) The function used to determine whether an entire sequential access file has been read is called _____. (Points : 3) close() function eof() function open() function None of the above 7. (TCO 13) Which of the following functions should be used to determine if a file was successfully opened? (Points : 3) is_active is_open is_closed is_ready 8. (TCO 13) What is the data hierarchy arranged from smallest to largest? (Points : 3) Bit, byte, record, field, file Byte, bit, field, record, file Bit, byte, field, record, file Byte, bit, field, file, record 9. (TCO 13) Given the following statements: ifstream theFile; theFile.open( myFile.txt , ios::in); What function would close this file? (Points : 3) ifstream.close(); ifstream.close( myFile.txt ); theFile.close(); ifstream.thefile.close; 10. (TCO 13) Which of the following does not have a stream associated with it? (Points : 3) cerr cin cout All of the above have streams associated with them. 11. (TCO 13) Provide a C++ code segment that reads data from a text file using a while loop. Use comments to explain what key lines of code are doing. (Points : 5)
in 40 mins
i uploaded the file