S11_mid

# S11_mid - University of Waterloo Midterm Examination Term Spring Year 2011 Student Name UW Student ID Number I understand that the contents of this

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

Term: Spring Year: 2011 Student Name: ______________________________________________________________________ UW Student ID Number: ______________________________________________________________ I understand that the contents of this exam paper are to remain confidential until Friday July 5, 2011. Failure to do so constitutes an academic offence under UW Policy 71. Signature: __________________________________________________________________________ Course Abbreviation and Number GEN E 121 (ME C++/RobotC) Course Title Digital Computation Section(s) 001 Instructor Ryan Norris Date of Exam Friday, June 17, 2010 Time Period Start time: 2:00pm End time: 4:00pm Duration of Exam 2 hours Allowed Materials: Writing instruments ONE (8.5x11) formula sheet written on ONE side only Disallowed Materials No electronic devices of ANY kind. No hats or containers such as purses, pencil cases, packsacks Notes: Questions are to be answered using C++ except where indicated as RobotC using You can assume for any programs that any necessary libraries (eg. #include <iostream> ) have been included. All questions will be marked for credit. If you need to make any assumptions to formulate your solution, state your assumptions clearly. Question Maximum Mark Mark 1. 28 2. 15 3. 10 4. 15 5. 15 6. 25 Total 108 University of Waterloo Midterm Examination

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

View Full Document
Spring 2011 GenE 121 (C++/RobotC) Midterm Page 2 of 8 1. Short Answer [28 Marks Total] a. [10 Marks] Write one line of code to i. Display the variable double a=3.14159 on the console with two decimal places. ii. Set the power for motorC to be 95%. iii. Compute the maximum of integers a , b , c using the max function; store the result in int m . iv. Declare an array of one-hundred float s. v. Configure the touch sensor sensorTouch as sensor S2 . b. [3 Marks] Write the value of the following expressions. i.
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 04/01/2012 for the course GENE 121 taught by Professor Smucker during the Winter '11 term at Waterloo.

### Page1 / 8

S11_mid - University of Waterloo Midterm Examination Term Spring Year 2011 Student Name UW Student ID Number I understand that the contents of this

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

View Full Document
Ask a homework question - tutors are online