the sorted input array
number of elements in the array
size of every element in bytes
function to compare two elements, search_data will always be passed as second argument
search mode that should be used
element that should be found
The address of the found element or null if nothing was found
Searches inside
arrayforsearch_databy using the comparison functionsearch_func.arraymust be sorted ascending.As
search_datais always passed as second argument tosearch_funcit's not required thatsearch_datahas the same type as the array elements.The complexity of this search function is O(log (num_elements)).