Exam 3: Inputoutput

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

When reading data into a char variable, after skipping any leading whitespace characters, the extraction operator >> finds and stores only the next character; reading stops after a single character.

(True/False)
4.9/5
(44)

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

(Multiple Choice)
4.8/5
(39)

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? ​ Cin)get(ch1); Cin)get(ch2); Cin >> alpha; ​

(Multiple Choice)
4.8/5
(40)

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

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

(Short Answer)
5.0/5
(37)

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.8/5
(30)

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)get(ch1); Cin)putback(ch1); Cin >> ch2;

(Multiple Choice)
4.7/5
(45)

Manipulators without parameters are part of the ____ header file.

(Multiple Choice)
4.9/5
(37)

Suppose that alpha is an int variable and ch is a char variable.The input is:​ 17 A ​ What are the values after the following statements execute? ​ Cin >> alpha; Cin >> ch; ​

(Multiple Choice)
4.8/5
(37)

____ is a parameterized stream manipulator.

(Multiple Choice)
5.0/5
(40)

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

(True/False)
4.7/5
(37)

Suppose that ch1, ch2, and ch3 are variables of the type char.The input is:​ A B C ​ What is the value of ch3 after the following statements execute? ​ Cin)get(ch1); Cin)get(ch2); Cin)get(ch3); ​

(Multiple Choice)
4.8/5
(37)

Suppose that x and y are int variables.Which of the following is a valid input statement?

(Multiple Choice)
4.8/5
(36)

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? 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?

(Multiple Choice)
4.9/5
(34)

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)
5.0/5
(29)

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

(Multiple Choice)
4.9/5
(45)

The number of input data extracted by cin and >> depends on the number of variables appearing in the cin statement.

(True/False)
4.9/5
(34)

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

Entering a char value into an int variable causes serious errors, called input failure.

(True/False)
4.9/5
(42)

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

(Short Answer)
4.9/5
(41)
Showing 21 - 40 of 40
close modal

Filters

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