For the binary search ,the array is order(ascending).So if we know searching element is in upper half ,means that we should continue search in upper half.So our lower index would change and not the upperindex..
My confusion is with the understanding of the question.what the question mean when it says "Scanned argument".Is it the key that we want to search (search argument) or the scanned array element.
If search argument is less than the middle element the we do stopsub=middle -1;
And if the search argument is greater than middle element then we do startsub=middlesub+1;
Please solve my doubt around the question understanding.