Question: 5. Given this vector: vector scores { 92, 87, 98, 76, 85 }; what is the value of the variable named i after the following

 5. Given this vector: vector scores { 92, 87, 98, 76,

5. Given this vector: vector scores { 92, 87, 98, 76, 85 }; what is the value of the variable named i after the following code is executed? auto max = max_element(scores.begin(), scores.end()); auto i = max - scores.begin(); a. 98 b. 2 c. 6 d. An iterator that points to the element with the largest value

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!