1. Write a function called find_min_max() that accepts an array of doubles and t
ID: 3529889 • Letter: 1
Question
1. Write a function called find_min_max() that accepts an array of doubles and the number of items in the array as input parameters, and returns the minimum and maximum values in the array through output parameters. 2. Write a function called reverse_array() that accepts an array of integers and the number of items in the array as parameters, and reverses the items in the array. Hence, the first item in the array should become the last one, and the last one in the array should become the first one, etc. You may NOT create a second array to solve this problem!Explanation / Answer
1) double min_max(double a[10],int size) { double max,min; int i; max=min=a[0]; for(i=1;imax) max=a[i]; //calculates max if(a[i]=0;i--) printf("%d",a[i]); //printing in reverse order }
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.