Syntax of bsearch() in C
void* bsearch(key, base, num, size, compare);
bsearch() Function in C
In C programming language, bsearch() function is used to perform a binary search on a sorted array to search for an element. The name bsearch stands for “binary search” which is an efficient algorithm for finding an item from a sorted list of items. It is defined inside the stdlib.h header file.