Question: in C++ the first part it is the int main... do the function based off the parameters and show the output. Do both func5 and

in C++ the first part it is the int main... do the function based off the parameters and show the output. Do both func5 and func6

in C++ the first part it is the int main... do thefunction based off the parameters and show the output. Do both func5

func5: ( 3 pts) - write a function that takes as input: an array of ints, thi length of an array, and an integer It returns: an int. - The functian should find the value in the array closest to the integer, and * return the index of that integer + Point: To make sure you understand how to update values in a Ioop +/ int func5 (int arr[], int val, int len) f / write function definition here %/ \} func6: ( 3p pts) - write a function that takes as input: an array of ints. the length of an array, and an integer (which acts as an index into the array). - It returns: - nathing- - The fuaction shauld find the snallest value in the array, and swap - that value with the value at the index integer. - For instance, if you've got the following array: - [3,3,5,1,2,7,6,9,4] * and the findex sent in was 7: - the stallest value in the array is 1 , at index 3. - The value at index 7 is 9 . Sa 1 and + 9 would be swapped in the array, resulting in: * [8,3,5,9,2,7,6,1,4] - Point: To make sure you can find (and update) the sallest value, and * can siapt ( int arr[], int ind, int len) \{ write function definition here / \}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!