Write a function named max_row that accepts a number of rows and columns, and a 2-D array of integers, as parameters and that returns the index of the row where the elements add up to the greatest value. For example:
int list[4][3] = {
    {  3,   8,  12},
    {  2,   9,  17},
    { 43,  -8,  46},
    {203,  14,  97}
};
Then the call of max_row(list, 4, 3) should return 3.
If there is a tie between two or more rows, return the row with the smaller index.
Your code should work for an array of any size at least 1x1.