Question: Write the following function: bool search(int a[], int n, int key, int *count); that is passed an integer array a of size n and a
![Write the following function: bool search(int a[], int n, int key,](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f39590c4705_56866f3959018434.jpg)
Write the following function: bool search(int a[], int n, int key, int *count); that is passed an integer array a of size n and a value key to search for in a, and returns true if the value is found, false otherwise, plus the number of times the key is found back through the pointer count. You may not use any array subscripting in the function search! Here is a driver program you may use, if you choose, to test your function. It produces a warning message (from the printf in main) when compiled that you can safely ignore. #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
