Q.44 The following function computes the maximum value contained in an integer array p[] of size n (n >= 1)
intmax(int*p,intn){inta=0, b=n-1;while(__________){if(p[a] <= p[b]){a = a+1;}else{b = b-1;}}returnp[a];}
The missing loop condition is
(A) a != n
(B) b != 0
(C) b > (a + 1)
(D) b != a
Answer: (D)
Explanation:












