Question: Write a function to return the index of the maximum value in an array. prototype: int findMaxArray ( int data [ ] , int size
Write a function to return the index of the maximum value in an array. prototype: int findMaxArrayint data int size; #define SIZE int dataSIZE; declare variables in the function: int maxValue data; assume the fir QL st array element is the largest. int maxIndex ; its index iterate through the array, if a value is greater than max, save it in max and save its index. return maxIndex; The max INDEX is The max VALUE is in c programming
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
