Define the recursive C++ function maxArray that returns the largest value in an array and adheres to the pseudocode just given.
What will be an ideal response?
```
// Precondition: anArray[first..last] is an array of integers,
// where first <= last.
// Postcondition: Returns the largest integer in
// anArray[first..last].
double maxArray(const int anArray[], int first, int last)
{
if (first == last)
return anArray[first];
else
{
int mid = first + (last – first) / 2;
return max(maxArray(anArray, first, mid),
maxArray(anArray, mid + 1, last))
} // end if
} // end maxArray
```
You might also like to view...
If you have a double value in your program and just set the precision for the cout statement to 4, what do you see? What do you see if you set the precision and the ios::fixed flag?
What will be an ideal response?
A Linux system administrator should continuously monitor a system's performance.
Answer the following statement true (T) or false (F)
Why are use cases that describe boundary conditions described during system design (as opposed to during requirements elicitation or analysis)?
What will be an ideal response?
The Background Removal command removes unwanted portions of a picture
Indicate whether the statement is true or false