Chapter01-SampleQuestions

Chapter01-SampleQuestions - BCEE 231 Chapter 1 - Sample...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: BCEE 231 Chapter 1 - Sample questions 1 SAMPLE EXAMINATION QUESTIONS Chapter 1 The mid-term (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 non-electronic 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 right-hand-side variable name has illegal character(s) c) The left-hand-side is not a (valid) name d) The right-hand-side 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 left-hand-side 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 sin-function 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.

Page1 / 5

Chapter01-SampleQuestions - BCEE 231 Chapter 1 - Sample...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online