binary search algorithm in C