CS246 Midterm: CS 246 0903-winter09-midterm-exam

259 views3 pages

Document Summary

Number of exam pages (including cover sheet): 3. "five" when i is 5, and otherwise prints the string "no go". As- sume your code is inserted into the main function. What is it used for? (d) 3 marks describe call by value. Give an example. (b) 3 marks below is a function named ave. give an overloaded version of ave that accepts 3 doubles and returns their average. double ave( double n1, double n2 ) Handle the array size as a parameter in a exible way. Note the matrix is a square (n by n). You do not need to put values into the matrix. Use a stream object to do this: 6 marks consider a class called polynomial (as in assignment 3) in which a c++ vector named v is used to represent a polynomial. Give the implementation of this class"s multiply function (which overloads *) for this polynomial class.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers

Related Documents