midterm-1-practice-solution

midterm-1-practice-solution - CSE 110 Midterm Exam 1...

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

View Full Document Right Arrow Icon
CSE 110 – Midterm Exam 1 – PRACTICE VERSION Spring 2010 ANSWER KEY NAME (please print legibly): Your University ID Number: Please leave at least one seat between yourself and the person next to you. Please use a pen for all answers. No books or notes can be used during the exam. Any CHEATING will result in an F as well as being written-up on academic dishonesty. NO BS bonus: If you do not know the answer to a problem and leave it blank you will receive 1 point for each part (e.g., a,b,c, etc.) that you leave blank. If you write anything in the space and it is wrong, you will receive a 0. You will not lose any points for small coding details or occasional misspellings. QUESTION VALUE SCORE 1 6 2 4 3 6 4 9 5 6 6 6 7 6 8 16 9 15 10 6 11 14 12 6 TOTAL 100 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
What is the base 10 equivalent of the base 8 value 111? (a) 111 (b) 73 (c) 25 (d) None of the above ANSWER: B 111 (base 8) = 1 * 64 + 1 * 8 + 1 * 1 = 64 + 8 + 1 = 73 (base 10) 2. (4 points) You are given two Java variables, already declared and assigned values. One variable, named price , is of type double and contains the price of an order. The second variable, named totalNumber , is of type int and contains the number of orders. Write an expression that calculates the total price for all orders. price * totalNumber
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.

Page1 / 7

midterm-1-practice-solution - CSE 110 Midterm Exam 1...

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