Exam 3: Input/Output

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

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

Free
(Short Answer)
4.9/5
(43)
Correct Answer:
Verified

member access

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;

Free
(Multiple Choice)
4.7/5
(45)
Correct Answer:
Verified

D

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

Free
(Short Answer)
4.7/5
(37)
Correct Answer:
Verified

char

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

(Short Answer)
4.8/5
(30)

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

(True/False)
4.9/5
(37)

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

(Short Answer)
4.8/5
(45)

____ is a parameterized stream manipulator.

(Multiple Choice)
4.7/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.9/5
(35)

You can use the function getline to read a string containing blanks.

(True/False)
4.7/5
(26)

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

(Multiple Choice)
4.7/5
(36)

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
(39)

Suppose that x is an int variable,y is a double variable and ch is a char variable and the input is: 15A 73.2 Choose the values after the following statement executes: Cin >> x >> ch >> y;

(Multiple Choice)
4.9/5
(27)

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

(Short Answer)
4.9/5
(35)

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

(True/False)
4.8/5
(40)

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

(Multiple Choice)
4.8/5
(40)

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

(Short Answer)
4.7/5
(32)

Suppose that ch1 and ch2 are char variables and the input is: WXYZ What is the value of ch2 after the following statements execute? Cin >> ch1; Ch2 = cin.peek(); Cin >> ch2;

(Multiple Choice)
4.7/5
(33)

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

(Short Answer)
4.8/5
(36)

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
(39)

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.8/5
(42)
Showing 1 - 20 of 50
close modal

Filters

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