Question: Fill in the blank boxes to complete the following function. int *find_largest(int a[], int n); When passed an array a of length n, the function
Fill in the blank boxes to complete the following function.
int *find_largest(int a[], int n);
When passed an array a of length n, the function will return a pointer to the arrays largest element.
int *find_largest(int a[], int n)
{
int i, *largest;
largest = &a[0];
for (i = 1; i < n; i++)
{
| if (a[i] > | #1 | ) |
largest = &a[i];
}
| return | #2 | ; |
}
i need answers of #1 and #2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
