Exam 3: Inputoutput

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

It is a good idea to redefine cin and cout in your programs.

(True/False)
5.0/5
(35)

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?

(Multiple Choice)
4.8/5
(38)

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

(Short Answer)
4.9/5
(31)

Suppose that x = 55.68, y = 476.859, and z = 23.8216. What is the output of the following statements? cout << fixed << showpoint; Cout << setprecision(3); Cout << x << ' ' << y << ' ' << setprecision(2) << z << endl;

(Multiple Choice)
4.8/5
(45)

If input failure occurs in a C++ program, the program terminates immediately and displays an error message.

(True/False)
4.8/5
(37)

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

(Short Answer)
4.8/5
(36)

Suppose that x and y are int variables, z is a double variable, and the input is: 28 32.6 12 Choose the values of x, y, and z after the following statement executes: Cin >> x >> y >> z;

(Multiple Choice)
4.9/5
(43)

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;.

(Short Answer)
4.9/5
(29)

The extraction operator >> skips only all leading blanks when searching for the next data in the input stream.

(True/False)
4.7/5
(34)

The following statements will result in input failure if the input values are not on a separate line. (Assume that x and y are int variables.) cin >> x; cin >> y;

(True/False)
4.8/5
(36)
Showing 41 - 50 of 50
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)