Answer the following statements true (T) or false (F)

1. When an operator has two operands of different data types, C++ always converts them both to double before performing the operation.
2. The following pair of C++ statements will cause 3.5 to be output.
double number = 7 / 2;
cout << number;

3. The following statement sets sum1, sum2, and sum3 all to zero.
sum1 = sum2 = sum3 = 0;

4. If the value of dollars is 5.0, the following statement will output 5.00 to the monitor:
cout << fixed << showpoint << setprecision(4) << dollars << endl;

5. The following statement sets the value of total to -3.
total -= 3;


1. FALSE
2. FALSE
3. TRUE
4. FALSE
5. FALSE

Computer Science & Information Technology

You might also like to view...

What is a void function?

What will be an ideal response?

Computer Science & Information Technology

The unit used for measuring _____ is Hertz (Hz).

A. amplitude B. frequency C. sampling rate D. bit depth E. dynamic range

Computer Science & Information Technology

Horizontal and vertical rulers help you quickly navigate through a document.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Use the ____ command to create a list with more than one level, such as the following list: 1.   Conduct needs assessment 1.1 Collect data1.2 Analyze data 2.   Sequence events

A. bullets B. indent C. multilevel list D. numbering

Computer Science & Information Technology