Upper Bound Binary Search C