Midterm 2 Review Quiz 09

# Size size of the array int initarrayint arr int

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview:   …what is the datatype of teams?        Problem 3: 25 points.    The snippets of code in this problem do not successfully accomplish the task  described in their accompanying comment.  Correct the code so that it performs the  task described in the comment. The code may have more than one error.  Make  your corrections clear and unambiguous.    (a)   /* Function that finds and returns the smallest element of an integer array. Inputs are the array and its size */ int FindMin(int array, int size) { int min = 0; for (int i=0; i <= size; i++) { if (i < min) { min = array[i]; } } } (b) For this problem, you may assume ...
View Full Document

## This note was uploaded on 02/08/2014 for the course CS 115 taught by Professor Staff during the Fall '08 term at Sonoma.

Ask a homework question - tutors are online