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