Write a C function to perform a binary search on a sorted array. The binary search algorithm is given in Example 4.6. The starting address, the key, and the array count are parameters to this function. Both the key and array count are integers.
Example 4.6
Write a subroutine to implement the binary search algorithm and a sequence of instructions to test it. Use an array of n 8-bit elements for implementation.