Hi ripwheels8,
The compilation syntax error you have is because you need to add the line
in the top of your source code. The compiler needs to know the prototype of the function "printf", which is declared in "/usr/include/stdio.h".
Besides this, reading the source of your function, we can see that it is a routine to find a maximum value in the array it receives as parameter. There is nothing to do with your home work.
To display the row and column of your array in the function you post, you need to already save the values of the indexes you are using when you get the maximum values. So, instead of
Code:
if (val[i][j] > max)
max = val[i][j]
you have to
Code:
if (val[i][j] > max) {
max = val[i][j];
max_i = i;
max_j = j;
}
Then when you print the result you will have these values safe. Of course, you have to declare the variable max_i and max_j on the top of the function. Two more considerations: when you submit code, use the vBcode this site has. Its hard to examine a code as an edited text. You can read about vBcode in this site faq. That was the first consideration. The second is: read carefully the problem you are submitted to until you understand before start writing some code.
I hope this helps you. Have a nice week end!