Question: Write a function to determine the index of the column in a 2D array of integers with the highest value of the array. For example,

 Write a function to determine the index of the column in

Write a function to determine the index of the column in a 2D array of integers with the highest value of the array. For example, given the following 2D array: int matrix [MAXSIZE] [MAXSIZE]={{10,2,3},{3,20,4},{5,8,2}}, the number of rows, and the number of columns, your function should return 1 (the highest value of the 2D array is in column 1). If more than one column has the highest value of the 2D array, your function should return the lowest index of the group of columns with that value Hint: in C++ array indexing starts from zero. For example: Input Result 5 2 1 2 3 4 5 6 7 8 9 0 0

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!