Binary search output problem

it is not accepting input of my variable “srch_ele” and always give output -1

@aattuull the problem is in line 33
image
this should be: for(int i=0;i<n;++i)

1 Like

:man_facepalming: :grimacing:

@aattuull dont forget to mark your doubt as resolved!