Write a program that can determine the minimum value in a 1D array as well as the
array subscript for this array element. With the values:
9, 0, -3, 12, -8, 5, 2
and
10, -82, 93, 3, -56, 100, 4, 9
Addition requirments:
Write a function that receives a SINGLE array and the number of elements in the array and prints the array, so the return type will be
Write a function that receives a SINGLE array, the number of elements in the array, the address to a variable that can store the minimum value in the array, and the address to a variable that can store the array index of the minimum value in the array; the return type will be
void. The function will determine which array element has the smallest value and it’s position (remember they start at 0); it will use pointers to assign these values to the variables whose addresses were passed to the function.
sample output
The first array is:
9, 0, -3, 12, -8, 5, 2
The smallest element of the array is -8.
and it is at position 4.
The second array is:
10, -82, 93, 3, -56, 100, 4, 9
The smallest element of the array is -82.
and it is at position 1.
void.