What does the following program do?

```
// Ex07_20.cpp
// What does this program do?
#include
#include
using namespace std;
const size_t arraySize{10};
void someFunction(const array&, size_t); // prototype
int main() {
array a{1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
cout << "The values in the array are:" << endl;
someFunction(a, 0);
cout << endl;
}
// What does this function do?
void someFunction(const array& b, size_t current) {
if (current < b.size()) {
someFunction(b, current + 1);
cout << b[current] << " ";
}
}
```


This program prints array elements in reverse order. The output would be

Computer Science & Information Technology

You might also like to view...

The practice of data hiding serves which of the following purposes:

a. it enhances the security of the object’s data b. it makes the interface cleaner c. it keeps the attributes of an object separate from the object’s methods d. all of the above are purposes of data hiding

Computer Science & Information Technology

Which of the following is an application of the breath first search on a graph?

1. Finding diameter of the graph 2. Finding bipartite graph 3. Finding the MST of a given graph a. 1 and 2 b. 1 c. 2 d. 1 and 3

Computer Science & Information Technology

The strcopy() function causes each element of string2 to be assigned to the equivalent element of string1 until the ____ is encountered.

A. end-of-string marker B. newline marker C. end-of-file marker D. a square bracket

Computer Science & Information Technology

A forensic investigator might be hired by a prosecutor to determine

A) Whether a company's merger was legal B) Whether a company problem was due to error or fraud C) How healthy a company is before investing in it D) If a company's employees are receiving a fair market wage

Computer Science & Information Technology