I'm looking to modify my function for a 10 x 20 array that finds the max value in the array. I'm trying to print the row and column number of the element that is the max value but I always get 10 and 20 no matter where the max value is. Can someone help me figure out why or point me to another thread. I searched but couldn't find anything pertaining to this topic. I modified it for a smaller array until I get it figured out.

Here's the code:

#include <stdio.h>
void findmax(int[2][20];
int main()
{
int numbers[2][20] = {1,4,5,8,3,2,15,227,45,87,6,92,23,21,45,85,95,187, 34,67,56,4,2,7,0,9,6,78,94,300,486,867,917,45,1,66 6,911,56,41,35};

findmax(numbers);
return 0;
}

void findmax(int num[2][20])
{
int i,j,max;
for(i=0;i<2;i++)
for (j=0;j<20;j++)
if (num[i][j] > max)
max = num [i][j];
printf("\nThe maximum array value is %d\n",max);
return;
}