So I compiled this code and added a function to check the matrix values before and after the function calls:
Code:
void show (int *ptr[], int r, int c) {
int i, ii;
for (i=0; i<r; i++) {
for (ii=0; ii<c; ii++) printf("%5d",ptr[i][ii]);
printf("\n");
}
}
// used this way:
show(arr,6,5);
And my theory is correct, the matrix is not changed! You know what that means? The whole thing is bogus (what1 and what2 do not do anything).
So why do "they" do this:
Code:
if (tmp > stam) stam = tmp;
Why not? It doesn't matter anyway, the return value is not used for anything.