CS110 CH5A

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

The __________ extension usually indicates that the file contains a Microsoft Word document.

.doc

True/False: In C++ 11 you can pass a string object as argument to a file stream object's open member function.

F

A file must be ________ before data can be written to or read from it.

opened

In general, there are two types of files: _________ and _________.

text, binary

A text file contains data that has been encoded as text, using a scheme such as _______ or Unicode.

ACSII

True/False: It is possible to define a file stream object and open a file in one statement.

T

Assuming dataFile is a file stream object, the statement: dataFile.close(); a. needs a filename argument to execute correctly b. closes a file c.is illegal in C++ d.is legal but risks losing valuable data e.None of these

b

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

buffer

A __________ is a short sequences of characters that appear at the end of a filename preceded by a period (known as a "dot").

filename extension

To allow file access in a program, you must #include this header file.

fstream

A binary file contains data that ______________ text

has not been converted to

To read data from a file, you define an object of this data type.

ifstream

The following code shows an example of opening a file for ___________. ifstream inputFile; inputFile.open("Customers.txt");

input (reading)

To write data to a file, you define an object of this data type.

ofstream

Assuming outFile is a file stream object and number is a variable, which statement writes the contents of number to the file associated with outFile?

outFile << number;

The following code shows an example of opening a file for ___________. ofstream outputFile; outputFile.open("Employees.txt");

output (writing)

There are two general ways to access data stored in a file:______________ access and direct access.

sequential

A(n) ______________ file, you access data from the beginning of the file to the end of the file.

sequential access

When the file contains numbers, those numbers are stored in the file as a __________________.

series of characters

This may be used to write information to a file.

stream insertion operator

A file ___________ is an object that is associated with a specific file and provides a way for the program to work with that file.

stream object


Conjuntos de estudio relacionados

Chapter 33: Management of Patients With Nonmalignant Hematologic Disorders - ML4

View Set

Cisco Networking Academy Chapter 6B

View Set

personal finance exam 1 (ch 1-4) problems

View Set

Integrated Chinese L5D1 Translation

View Set

Week 6: Economies of Scale, Imperfect Competition and Trade

View Set

psychology chapter 3 - development over life span

View Set