What does the following program do?
```
// Ex07_17.cpp
// What does this program do?
#include
#include
using namespace std;
const size_t arraySize{10};
int whatIsThis(const array
int main() {
array
int result{whatIsThis(a, arraySize)};
cout << "Result is " << result << endl;
}
// What does this function do?
int whatIsThis(const array
if (size == 1) { // base case
return b[0];
}
else { // recursive step
return b[size - 1] + whatIsThis(b, size - 1);
}
}
```
This program sums array elements. The output would be
Result is 55
You might also like to view...
To insert a line break hold down the ________ key and press the Enter key
A) Ctl B) Tab C) Alt D) Shift
If a field is shortened after being populated, the danger is that some information might be "cut off" or ________
Fill in the blank(s) with correct word