CSC 215 Quiz 3

CSC 215 Quiz 3 - 10. The simplest expression in C++ is a...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
C++ Quiz Ch3 Bronson 2e Sp08 True/False Indicate whether the sentence or statement is true or false. 1. In C++, the assignment operator has a higher precedence than any other arithmetic operator. 2. Numbers sent to cout are normally displayed left-justified in the display field. 3. In C++, the assignment expression sum = sum + 10 is invalid. 4. Besides displaying correct results, it is extremely important for a program to present its results attractively. 5. The ostream class method setf(ios::fixed) is equivalent to the stream manipulator setiosflags(fixed). 6. Counting statements have the form variable += fixedNumber 7. Using a mathematical library function without including the preprocessor statement #include <cmath> is a common programming error in C++. 8. In C++, arguments of all trigonometric functions (sin, cos, etc.) must be in degrees. 9. In addition to outputting integers in decimal notation, the oct and hex manipulators permit conversions to octal and hexadecimal, respectively.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 10. The simplest expression in C++ is a single constant. Multiple Choice Identify the letter of the choice that best completes the statement or answers the question. 11. The term ____ refers to an item, such as a variable or argument, that sets a condition usually considered active or nonactive. a. expression c. flag b. variable d. constant 12. The operator used to force the conversion of a value to another type is the ____ operator. a. cast c. binary b. logical d. single 13. In C++, the default precision is set to ____ decimal places. a. 5 c. 7 b. 6 d. 8 14. The ostream class method precision(n) is equivalent to the stream manipulator ____. a. precision() c. setprecision() b. setfill() d. setw() 15. In C++, to access mathematical functions in a program requires that the mathematical header file named ____ be included with the function. a. number c. cmath b. cnumber d. math 16. Another name for a manipulator method that uses arguments is a ____ manipulator....
View Full Document

Ask a homework question - tutors are online