ANSWERS: 1
  • As a matter of policy, I don't do homework for others. Here's some tips: - To pass an array to the function, declare the function as taking a pointer to integer, and also an integer which tells how many elements are in the array. The caller will allocate the array and supply the address of the array and the number of elements. - Inside the function, declare a temporary integer and set it to the predefined constant MAX_INT (this is defined by the C++ runtime library). Then, compare each element of the array with this temporary value. If the array element is less than the temporary value, copy it to the temporary value. - Repeat that for every element in the array. When you're done, the temporary value will be equal to the lowest element in the array.

Copyright 2018, Wired Ivy, LLC

Answerbag | Terms of Service | Privacy Policy