GATEverse
← GATE CSE 2016 Set 1

Q34

MCQ2 marks, −0.67

The following function computes the maximum value contained in an integer array P[ ]P[ \ ] of size nn (n>=1)(n>=1). 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.

Loading…