0
What is the function of 'bsearch' in this binary search program?
https://code.sololearn.com/ch9TiB2oCW25/?ref=app i can't write it here
3 Réponses
+ 8
bsearch is a boolean type variable which is used to exit the loop if the number in the array is found.
Initially bsearch is set to false. If the number is present in the array, bsearch will become true and when the condition will be checked it will not satisfy, so it will get out of the loop.
If number is not found then the bsearch will remain false
+ 4
It's being used as a boolean variable.It's initially false and is being set to true if the element is found in the array.
0
Gellert , can you explain it again please? i dont get the point:'