Consider the following C program that attempts to locate an element x in an array Y[ ] using binary search. The program is erroneous.
1. f(int Y[10], int x) {
2. int u, j, k;
3. i = 0; j = 9;
4. do {
5. k = (i + j)/2;
6. if (Y[k] ! = x) && (i < j);
7. } while ((Y[k] ! = x) && (i
Reveal answer
Fill a bubble to check yourself
