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
You might also like to view...
Which of the following arithmetic operations has the highest level of precedence?
(A) +- (B) */ (C) ^ (D) ( )
The ____ layer in the TCP/IP model maps to the OSI Application, Presentation, and Session layers.
A. Network Interface B. Transport C. Application D. Internetwork