Determine the index of the maximum of N elements of a TAB array of integers.
Difficulty level
Video recording
This exercise is mostly suitable for students
int MAX2(int TAB[], int N)
{
int I, MAX;
MAX = 0;
for (I = 1; I<N; I++)
if (TAB[MAX] < TAB[I])
MAX = I;
return MAX;
}
Back to the list of exercises
Looking for a more challenging exercise, try this one !!
Star pattern 19