This preview shows pages 1–2. 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: BCEE 231 Chapter 1  Sample questions 1 SAMPLE EXAMINATION QUESTIONS Chapter 1 The midterm (final exam) will have up to 8 (25) questions for 1 (3) hours. Adjacent students will have different exams. Special instructions: Closed book. No calculators. A nonelectronic dictionary is permitted. In Part 1: Pick the best answer among the choices listed in the right column. In Part 2: Write the answer (e.g. a, b, or ), and its reason or justification. One point will be given for each correct answer provided that the stated reason is sensible and specifically related to the situationA reason is not required for picking the last choice. Part 1 Note: Line numbers are added for reference purpose only. The situation In relation to the described situation: 1. The following assignment expressions have a common syntax error: f(x) = (a+b)*Area*x; g(x, y, z) = a*sin(x*y)*exp(b*z); A B = C; A*B = C; A+B*C = D; The syntax error may be due to: a) A variable name is too long b) A righthandside variable name has illegal character(s) c) The lefthandside is not a (valid) name d) The righthandside expression has illegal or missing operator(s) e) Unbalanced parentheses _____________ f) None of the above 2. The following expression is supposed to compute y b a x V sin 2 2 + = : V = x*sqrt(a*a+b*b)*Sin y; It has an error. The error may be due to : a) A variable name is too long b) The part 2 2 b a + is badly implemented c) The variable name in the lefthandside has illegal character(s) d) The part y sin is badly implemented e) Unbalanced parentheses _____________ f) None of the above 3. The following expression is supposed to compute y b a x V sin 2 2 + = : V = x * hypot(a,b) * sin y; The syntax error may be due to: a) The hypot function is not applicable b) Bad use of the sinfunction BCEE 231 Chapter 1 ...
View
Full
Document
This note was uploaded on 11/21/2010 for the course ENGR 235 taught by Professor Yy during the Spring '10 term at Concordia Canada.
 Spring '10
 yy

Click to edit the document details