This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: ENGR 1077 Engineering Computations - B 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 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 2. The math function tan will compute tangent when the angle is given in radians. A. true B. false 3. In a case sensitive language, such as C++, the variables apples and APPLES refer to different storage locations. A. true B. false 4. Line comments that begin with // must be terminated by another //. A. true B. false 5. The purpose of a comment is to help the compiler understand your program and create efficient object code. A. true B. false 6. 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 7. A blank space can be placed between the ampersands in the logical operator && to make it more readable. A. True B. False 8. The while statement will execute the loop body if the condition evaluates to false or zero. A. True B. False 9. An expression involving operators can appear after the output operator << in a cout statement. A. true B. false 10. One reason for an infinite loop in a while loop is that the loop body has no statements which change the values of variables in the boolean expression part of the while loop. A. True B. False 11. The values which follow the word case in a switch statement can be a floating point constant....
View Full Document
This test prep was uploaded on 04/19/2008 for the course ENGR 1077 taught by Professor Eddyg during the Spring '07 term at Laurentian.
- Spring '07