This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: ENGR 1077 – Engineering Computations - C Dr. E. Guerra Mid-Term Test #1 Feb. 14, 2008 11:30 am – 1:00 pm True-False: 15 marks (0.5 marks will be deducted for wrong answers) 1. The continue statement causes the program to skip the rest of the loop body and to determine if the loop body is to be executed again. A. True B. False 2. The operands of the operator || must both be Boolean values. A. True B. False 3. A blank space can be placed between the ampersands in the logical operator && to make it more readable. A. True B. False 4. The while statement will execute the loop body if the condition evaluates to false or zero. A. True B. False 5. Line comments that begin with // must be terminated by another //. A. true B. false 6. The purpose of a comment is to help the compiler understand your program and create efficient object code. A. true B. false 7. The setw manipulator is used to set the field width for all values that are printed until another setw manipulator is encountered. A. true B. false 8. The preprocessor directive #include <iostream> copies the file iostream into the program before compilation, so that the program can use input and output objects and operators. A. true B. false 9. The math function tan will compute tangent when the angle is given in radians. A. true B. false 10. The values which follow the word case in a switch statement can be a floating point constant. A. True B. False 11. In a case sensitive language, such as C++, the variables apples and APPLES refer to different storage locations....
View Full Document
- Winter '07
- Control flow, True B. False, A. True B., D B D C B C D D