Q34
MCQ2 marks, −0.67MediumThe following function computes the maximum value contained in an integer array of size .
int max (int *p,int n) {
int a = 0, b=n-1;
while (__________) {
if (p[a]<= p[b]) {a = a+1;}
else {b = b-1;}
}
return p[a];
}
The missing loop condition is:
Sign in to save attempts.
Keys: A–D or 1–4 choose, Enter checks, ← → move between questions.
Solutions and discussion are hidden while you attempt this question. They open once you check or show the answer.