What happens when you search for 35 in the list [10,20,30,40,50]?
To simplify this i'll just post the options,
1.The program would handle the case by printing a suitable message that the element is not found
2.The value 30 is returned as it is the closest number less than 35 that is present in the list
3.The value 40 is returned as it is the closest number greater than 35 that is present in the list
4.The program will abruptly come to an end without intimating anything to the user.