F09 Exam+1_part1_solution

F09 Exam+1_part1_solution - The University of Michigan EECS...

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

View Full Document Right Arrow Icon
1 The University of Michigan EECS 183: Elem. Programming Concepts Fall 2009 Exam 1: Part 1 Professor ML Dorf Wednesday October 7, 2009 6:00 to 7:30 pm Max: 96 points Instructions Part 1 of the exam consists of twenty five multi-choice questions worth 4 points each. Please keep this in mind as you work The exam is closed book . No books, notes or the like may be used. No computers, calculators, PDAs, cell phones or other electronic devices may be used The exam is closed neighbor. No 'partner' on this -- only on projects Some questions are not simple, therefore, read carefully Assume all code and code fragments compile, unless otherwise specified. Assume/use only the standard ISO/ANSI C++. Within the following questions, the term valid means: code uses standard ISO/ANSI C++, code is explicit on all typing, i.e., does not make use of default settings. This course operates under the rules of the College of Engineering Honor Code. Your signature endorses the pledge below. After you finish your exam, sign your scantron sheet to indicate the statement below I have neither given nor received aid on this examination, nor have I concealed any violations of the Honor Code.
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 (25 questions * 4 points per question = 100 points possible) MAX points will be 96 1. Which of the following code fragments will not compile: a) double x = 1000; b) double x = 1000.0; c) double x = 1000.; *d) double x = 1,000; 2. What does the following code print? double x = 19.0 / 5 - 5 / 2; cout << x; a) -0.6 b) -1 c) 1 *d) 1.8 e) the above code causes a division by zero error 3. What does the C++ expression 3 / 2 + 5 % 2 evaluate to? *a) 2
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/24/2010 for the course EECS 183 taught by Professor Dorf during the Spring '08 term at University of Michigan.

Page1 / 9

F09 Exam+1_part1_solution - The University of Michigan EECS...

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

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