Midterm 4 - The University of British Columbia APSC 160:...

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

View Full Document Right Arrow Icon
The University of British Columbia APSC 160: Introduction to Computation in Engineering Design Midterm Examination, October 23, 2007. Examiner: E.M. Knorr Time: 75 minutes Total marks: 60 Last Name First Name: Student ID # (PRINT) Signature Lab Section: (if unknown, state day/time of lab) The examination has 10 pages, and that includes this cover sheet. Check that you have a complete paper. Fill in your name, ID, signature, and lab section above. To save time, you don’t have to write your name on each page since the pages have serial numbers on them. This is a closed book examination. No books, help sheets, calculators, cell phones, or other materials may be used. Work quickly and do the easy questions first . Part marks will be awarded for most questions. The marks for each question are given in braces. Use this to manage your time. Please write down any reasonable assumptions that you are making, if you believe that a question is ambiguous . To minimize disruptions during the exam, please avoid asking the invigilators for hints or for more information. Please ask only if you truly believe that a question is in error. Marks Page Max. Achieved 2 10 3 8 4 7 5 8 6 7 7 7 8-10 13 Total 60
Background image of page 1

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

View Full DocumentRight Arrow Icon
Page 2 {10 marks} Multiple choice questions. Circle the best answer for each question. 1. The binary number 10101 is converted to which of the following numbers in decimal? a) 20 b) 16 c) 22 d) 23 e) none of the above 2. Which of the following is the most high-level language in terms of describing a problem? a) C b) Assembly language c) hexadecimal d) machine language e) English-like pseudo-code 3. Which of the following numbers is largest (in decimal terms)? a) 17 in hexadecimal b) 10000 in binary c) 32 in decimal d) 2C in hexadecimal e) 100101 in binary 4. When a program runs on the CPU, which of the following storage locations is the fastest for the CPU to access? a) Level 2 cache b) a register c) main memory (also called RAM) d) a disk drive that’s 1 year old, made by IBM e) a new disk drive that just went on sale yesterday at Staples or FutureShop 5. Which of the following does not typically happen when a return statement is executed in a function? a) any local/temporary variables for the function are destroyed b) the return value is passed back to the caller c) the function returns to resume execution at the calling statement d) the compiler checks for syntax errors e) all of the above happen at return time
Background image of page 2
Page 3 6. {4 marks} Briefly, explain how functions can help achieve the software engineering goals of modularity and reusability. 7. {0 marks} The BC Lions are in first place. Does the BC Lions football team have what it takes to win the Grey Cup championship next month in Toronto? a)
Background image of page 3

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

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

Page1 / 10

Midterm 4 - The University of British Columbia APSC 160:...

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

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