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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!