Question: // C programming: my output is incorrect. does not match with the expected value. /* Compute the positions of the minimum and maximum of an
// C programming: my output is incorrect. does not match with the expected value.
/* Compute the positions of the minimum and maximum of an array, and place the results into the locations pointed at by min and max. If there is more than one minimal or maximal position, report the first one. If the array is empty, do nothing. */ void minmax(int a[], int len, int *minpos, int *maxpos) { *minpos=*maxpos=a[0];
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
