Analyze the following code:
```
#include
using namespace std;
void reverse(int list[], const int size, int newList[])
{
for (int i = 0; i < size; i++)
newList[i] = list[size - 1 - i];
}
int main()
{
int list[] = {1, 2, 3, 4, 5};
int newList[5];
reverse(list, 5, newList);
for (int i = 0; i < 5; i++)
cout << newList[i] << " ";
}
A. The program displays 1 2 3 4 5 and then raises an ArrayIndexOutOfBoundsException.
B. The program displays 1 2 3 4 6.
C. The program displays 5 4 3 2 1.
D. The program displays 5 4 3 2 1 and then raises an ArrayIndexOutOfBoundsException.
```
C. The program displays 5 4 3 2 1
You might also like to view...
UAC keeps every user in standard mode instead of in administrator mode by default
Indicate whether the statement is true or false
With ________ a process has complete control of the system and can add or change programs and files, monitor other processes, send and receive network traffic, and alter privileges.
Fill in the blank(s) with the appropriate word(s).