CS 150 Chapter 3

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

inFile.open("progdata.dat");

Consider the following program segment. ifstream inFile; //Line 1 int x, y; //Line 2 ... //Line 3 inFile >> x >> y; //Line 4 Which of the following statements at Line 3 can be used to open the file progdata.dat and input data from this file into x and y at Line 4?

member access

In C++, the dot is an operator called the ____________________operator.

char

In the C++ statement, cin.get(u); u must be a variable of type ____________________.

outFile.open("outputData.out");

Suppose that outFile is an ofstream variable and output is to be stored in the file outputData.out. Which of the following statements opens the file outputData.out and associates outFile to the output file?

setw

The manipulator ____________________ is used to output the value of an expression in a specific number of columns.

putback

The stream function ____________________ lets you put the last character extracted from the input stream by the get function back into the input stream.

iomanip

To use a parameterized stream manipulator in a program, you must include the header file ____________________.

iomanip

To use the manipulator setprecision, the program must include the header file ____________________.

predefined or pre defined or pre-defined

C++ comes with a wealth of functions, called ____________________ functions, that are written by other programmers.

classes

C++ has a special name for the data types istream and ostream. They are called ____________________.

fstream

C++ provides a header file called ____________________, which is used for file I/O.

istream

The functions get, ignore, and so on are members of the data type ____________________.

cin.setf(ios::fixed);

On some compilers, the statements cin >> fixed; and cin >> scientific; might not work. In this case, you can use the statement ____________________ in place of cin >> fixed;.

cin.setf(ios::left);

On some compilers, the statements cin >> left; and cin >> right; might not work. In this case, you can use the statement ____________________ in place of cin >> left;.

peek

The function ____________________ returns the next character in the input stream; it does not remove the character from the input stream.

unsetf

You can disable the manipulator left by using the stream function ____________________.

istream

cin is called a(n) ____________________ object.


Kaugnay na mga set ng pag-aaral

9.3 - Persons Subject to State Registration

View Set