Question: c++ program 3. Write a function named location_ of largest that takes as its arguments the following (1) an array of integer values (2) an

 c++ program 3. Write a function named "location_ of largest" that

c++ program

3. Write a function named "location_ of largest" that takes as its arguments the following (1) an array of integer values (2) an integer that tells how many integer values are in the aray The function should retun as its value the subscript of the cell containing the largest of the values in the array. Thus, for example, if the array that's passed to the funetion looks like this: 2 58//26 90 134 11 then the function should retun the integer 2 as its value. If there is more than one cell the values in the array, then the fimction should return the smallest of the subscripts of the cells containing the largest values. For example. if the array that's passed to the function is containing the largest of 2 3 5 91 58 1/26 1 91 I 34 1 70 then the largest value occurs in cells 2 and 5. so the function should return the integer value 2

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!