Question: What value is returned by the method named result? int result(int[ ] anArray, int num) { int i, r; for (r = 0, i =
What value is returned by the method named result?
int result(int[ ] anArray, int num)
{
int i, r;
for (r = 0, i = 1; i < num; ++i)
if (anArray[i] > anArray [r] )
r = i;
return (r);
}
a. the index of the largest of the first num elements of array anArray
b. the value of the largest of the first num elements of array anArray
c. the index of the smallest of the first num elements of array anArray
d. the value of the smallest of the first num elements of array anArray
e. the index of the last element greater than its predecessor within the first num elements of array anArray
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
