C++ -- Chapter 3
25.67 356.88 7623.97
Suppose that x = 25.67, y = 356.876, and z = 7623.9674. What is the output of the following statement: cout << fixed << showpoint; cout << setprecision(2); cout << x << ' ' << y << ' ' << z << endl;
False
If the input failure occurs in C++ program, the program terminates immediately and displays an error message
False
In an output statement, each occurrence of endl advances the cursor to the end of the current line on an output device.
alpha = 17, ch = 'A'
Suppose that alpha is an int variable and ch is a char variable and the input is: 17 A what are the values after the following statements execute? cin >> alpha; cin >> ch;
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?
1565.683 85.7800 123.98
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;
This statement results in input failure
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;
x = 15, ch = 'A', y = 73.2
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 value after the following statement executes: cin >> x >> ch >> y;
False
The following statements will result in input failure if the input values are not on a separate line: cin >> x; cin >> y;
peek
The function __________ returns the next character in the input stream; it does not remove the character from the input stream