C++ Chapter 13

¡Supera tus tareas y exámenes ahora con Quizwiz!

To access files from a C++ program, you must #include

<fstream>.

A file ________ is a small holding section of memory that file-bound information is first written to

buffer

The statement dataFile.close();

closes a file.

ofstream, ifstream, and fstream are

data types.

Which statement opens a file in such a way that information will only be written to its end?

dataFile.open("info.dat", ios::out | ios::app);

The ________ member function reports when the end of a file has been found.

eof()

All stream objects have ________ that indicate the condition of the stream.

error state bits

Which statement opens a file and links it to a file stream object?

file.open("filename.txt");

The member function, ________, reads a single character from a file.

get

Data stored ________ is lost when the computer is powered down.

in RAM

The state bit, ________, can be tested to see if the end of an input stream has been encountered.

ios::eofbit

The process of writing in-memory objects to a file so that the object can later be read back into memory

is called serialization.

The ________ data type can be used to create files and write information to them.

ofstream

To set up a file to perform file I/O, you must declare

one or more file stream objects

The member function ________ writes a single character to a file.

put

Closing a file causes any buffered information to be

saved to the file.

The ________ may be used to write information to a file.

stream insertion operator <<

The operation of moving to a particular location in an input file is accomplished through

the seekg member function.

The operating system records the information that tracks the end of the file

when a file is closed.

The ________ function can be used to store binary data to a file.

write


Conjuntos de estudio relacionados

Chapter 24: Parathyroid and Adrenal Disorders

View Set

Cybersecurity Baier CofC Fall 2021

View Set

Chapter 6 Performance Management

View Set

Chapter 8: Structuring Organizations for todays challenges

View Set

Chapter 58: Assessment and Management of Patients with Breast Disorders

View Set

Nursing Assistant Care:Chapter 2

View Set

Nursing Management: Patients With Sexually Transmitted Infections

View Set

Anatomy & Physiology Chapter 8 Homework

View Set