I want to find the winner and print the winner's ID.Here i have tried to get the maximum sum But it doesn't outputs the maximum sum.
can anyone show me how can get the required outputs.
And also in my question I have to use data[][5].And I have to store the scores in 4x3 2D array.But I used 4x5 2D array in the main program otherwise it gives an error message.
The other problem you're going to have is that your array bounds and the size of your table do not agree.
At line 8, you've declared tbl to be 4x3.
At lines 10 and 11, you telling your functions the table is 4x5. That's going to cause you to index past the end of the table.
It's good practive to define constant values for array bounds and then use those as your loop limits. This makes it easy to change the size of the array in one place and not have to make many changes throughout your program.