Name: ________________________________

Honor Code Acknowledgment: ___________________


Random Quiz # 2

CPS 100E, Fall 1996

Due: September 12


Problem 1 Beyond Thunderdome: (3 points)

Write the function MaxValue that returns the largest value stored in the first num locations of the array a.

int MaxValue(const Vector<int> & a, int num) // precondition: a contains num values // postcondition: returns the largest of the values stored in a