Chapter 14

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

To add records to the end of an existing output file, you use the _______ mode in the open function.

XXXios::out

Which of the following statements opens the payroll.txt file for output? The file is associated with the outPayroll object.

XXXoutPayroll.open("payroll.txt", ios:: out);

You use the ____________ function to close a sewquential access file.

close

A ________ is a single item of information about a person, place, or thing.

field

For a program to create a file object, it must include the ________ file.

fstream

Which of the following statements creates an object named inPayroll that represents an input file in the program?

ifstream inPayroll;

Which of the following statements opens the payroll.txt file for input? The file is associated with the inFile object.

inFile.open("payroll.txt", ios::in);

You can use the ___________ function to determine whether the open function was successful.

is_open

Which of the following statements reads a number from an input file named managers.txt and stores the number in the salary variable? The file is associated with the inFile object.

none of the above

You use the ________ class to instantiate an output file object

ofstream

Which of the following statements creates an object named outPayroll that represents an output file in the program?

ofstream outPayroll;

Which of the following statements writes the contents of the city and state variables to an output file named address.txt? The file is associated with the outFile object.

outFile << city << '#' << state << endl;

Which of the following statements writes the contents of the city variable to an output file named address.txt? The file is associated with the outFile object.

outFile << city << endl;

A group of related fields that contain all of the data about a specific person, place, or thing is called a ______.

record

Which of the following while clauses tells the computer to repeat the loop instructions until the end of the file is reached? The file is associated with the inFile object.

while (!infile.eof () )


संबंधित स्टडी सेट्स

Biology Chapter 43 and 44 Mastering Biology

View Set

Eco 29 Ch. 21 MyEconLab Questions

View Set

Science- Work and Simple Machines

View Set

CITI - Updates to Expedited Review Procedures

View Set

Chapter 9: Cellular Respiration, Chapter 6, Chapter 5: Membrane Transport & Cell Signaling (Multiple Choice) chp5-8

View Set

GERIATRIC ATI TEST 2ND WEEK ASSESS A RACIEL

View Set