Question: C Programming d) Complete the following function: void find_smallest(int arr[], int n, int *small, int *second_small); When passed an array arr of length n, this
C Programming
![C Programming d) Complete the following function: void find_smallest(int arr[], int n,](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f93bb8a9abf_78466f93bb84b40f.jpg)
d) Complete the following function: void find_smallest(int arr[], int n, int *small, int *second_small); When passed an array arr of length n, this function will search for its smallest and second smallest elements and store them in the variables pointed to by smallest and second_smallest, respectively. To receive full marks, you are required to use a pointer to access array elements. Up to four marks will be deducted if you use array subscripting in your function body To simplify your solution, you can assume that the elements of the array arr are distinct and it has at least with two elements. No error handling is required. [8 points] #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
