palsubho801-create/Beginner-Tasks-Repo
Implement a Binary Search Function in C
Open
#23 opened on Oct 16, 2025
hacktoberfest
Repository metrics
- Stars
- (0 stars)
- PR merge metrics
- (PR metrics pending)
Description
Create a new file named 'binary_search.c' that implements the Binary Search algorithm.
Requirements:
- The function must assume the input array is already sorted.
- It should return the index of the target element if found, or
-1otherwise. - Include a
mainfunction to test the search on a hardcoded sorted array.