What does the following program do?

```
// What does this program do?
#include
using namespace std;

void someFunction( int [], int, int ); // function prototype

int main()
{
const int arraySize = 10;
int a[ arraySize ] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };

cout << "The values in the array are:" << endl;
someFunction( a, 0, arraySize );
cout << endl;
} // end main

// What does this function do?
void someFunction( int b[], int current, int size )
{
if ( current < size )
{
someFunction( b, current + 1, size );
cout << b[ current ] << " ";
} // end if
} // end function someFunction
```


This program prints array elements in reverse order. The output would be
The values in the array are:
10 9 8 7 6 5 4 3 2 1

Computer Science & Information Technology

You might also like to view...

You can visit each item in an array by sending it a message.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Which of the following terms is consistent with Microsoft terminology?

A. application B. software C. program D. applet

Computer Science & Information Technology

The ________ of a photo refers to the difference between the darkest and the lightest areas of the image

Fill in the blank(s) with correct word

Computer Science & Information Technology

When you create a query that involves a view, SQL changes the query to one that selects data from the table(s) in the database that created the view.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology