Binary Search Array

i am writing the same code as explained but the output i get is -1 all the time, the scope and variable declarations are throughly checked what is the issue

please share your code after saving it on ide.codingblocks.com