click below
click below
Normal Size Small Size show me how
chap 3
| Question | Answer |
|---|---|
| When the fixed manipulator is used, the value specified by the setprecision manipulator will be the number of digits to appear after the decimal point. | true |
| What is the value of number after the following statements execute? int number = 10; number += 5; number -= 2; number *= 3; | 39 |
| To use the rand( ) function, you must #include this header file in your program | cstdlib |
| What is the value of average after the following code executes? double average; average = 1.0 + 2.0 + 3.0 / 3.0; | 4.0 |
| The statement cout<<setprecision(5)<<dollars<<endl; will output $5.00 to the screen | false |
| Which statement is equivalent to the following? number += 1; | number = number + 1 |
| What will the value of result be after the following statement executes? result = 6-3*2+7-10/2 | 2 |
| Assume that x is an int variable. What value is assigned to x after the following assignment statement is executed? x = -3 + 4 % 6 / 5; | -3 |
| If you want to know the length of the string that is stored in a string object, you can call the object's size member function | false |
| The ________ operator always follows the cin object, and the ________ operator follows the cout object | >>, << |
| The cin << statement will stop reading input when it encounters a newline character. | true |
| The ________ causes a program to wait until information is typed at the keyboard and the Enter key is pressed. | cin object |
| Which is true about the following statement? cout<<set(4)<<num4<<" "; | it allows four spaces for the value in the variable num4 |