Exam 3: Inputoutput

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

____ is a parameterized stream manipulator.

(Multiple Choice)
4.9/5
(35)

Suppose that ch1 and ch2 are char variables and the input is: WXYZ What is the value of ch2 after the following statements execute? Suppose that ch1 and ch2 are char variables and the input is: WXYZ What is the value of ch2 after the following statements execute?

(Multiple Choice)
4.9/5
(42)

Suppose that ch1 and ch2 are char variables, and alpha is an int variable. The input is: ​ A 18 ​ What are the values after the following statement executes? ​ Suppose that ch1 and ch2 are char variables, and alpha is an int variable. The input is: ​ A 18 ​ What are the values after the following statement executes? ​   ​

(Multiple Choice)
4.9/5
(33)

Suppose that ch1, ch2, and ch3 are variables of the type char. The input is: ​ A B C ​ Choose the value of ch3 after the following statement executes: ​ Cin >> ch1 >> ch2 >> ch3; ​

(Multiple Choice)
4.8/5
(36)

Consider the following program segment. Consider the following program segment.   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? 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?

(Multiple Choice)
4.9/5
(43)

Suppose that x = 25.67, y = 356.876, and z = 7623.9674. What is the output of the following statements? Suppose that x = 25.67, y = 356.876, and z = 7623.9674. What is the output of the following statements?

(Multiple Choice)
4.8/5
(47)

In an output statement, each occurrence of endl advances the cursor to the end of the current line on an output device.

(True/False)
4.8/5
(30)

Suppose that x = 1565.683, y = 85.78, and z = 123.982. What is the output of the following statements? Suppose that x = 1565.683, y = 85.78, and z = 123.982. What is the output of the following statements?

(Multiple Choice)
4.8/5
(36)

Suppose that x is an int variable, y is a double variable, and z is an int variable. The input is: ​ 15 76.3 14 ​ Choose the values after the following statement executes: ​ Cin >> x >> y >> z; ​

(Multiple Choice)
5.0/5
(35)

Suppose that x and y are int variables, and z is a double variable. 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.8/5
(42)

Suppose that x and y are int variables, ch is a char variable, and the input is: 4 2 A 12 Choose the values of x, y, and ch after the following statement executes: Cin >> x >> ch >> y;

(Multiple Choice)
5.0/5
(46)

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

(True/False)
4.8/5
(38)

Suppose that alpha, beta, and gamma are int variables and the input is: 100 110 120 200 210 220 300 310 320 What is the value of gamma after the following statements execute? Suppose that alpha, beta, and gamma are int variables and the input is: 100 110 120 200 210 220 300 310 320 What is the value of gamma after the following statements execute?

(Multiple Choice)
4.7/5
(41)

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

(Short Answer)
4.8/5
(39)

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

(Short Answer)
4.8/5
(37)

Suppose that x is an int variable, ch is a char variable, and the input is: 276. Choose the values after the following statement executes: Cin >> ch >> x;

(Multiple Choice)
4.8/5
(35)

When you want to process only partial data, you can use the stream function ____ to discard a portion of the input.

(Multiple Choice)
4.8/5
(35)

Suppose that x is an int variable and y is a double variable. The input is: ​ 10 20.7 ​ Choose the values after the following statement executes: cin >> x >> y;.

(Multiple Choice)
4.7/5
(39)

What is the output of the following statements? What is the output of the following statements?

(Multiple Choice)
4.8/5
(37)

In the statement cin >> x;, x can be a variable or an expression.

(True/False)
4.7/5
(38)
Showing 21 - 40 of 40
close modal

Filters

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