What are the ending contents of the array? Choices show elements in index order 0, 1, 2. int yearsList[3]; yearsList[0] = 5; yearsList[1] = yearsList[0]; yearsList[0] = 10; yearsList[2] = yearsList[1];

Respuesta :

The array yearsList is used to hold multiple values and variables

The ending content of the array are 10, 5, 5

How to determine the ending content of the array

The first line of the program declares an array variable of three elements

int yearsList[3];

The second line assigns 5 to the 0 index

yearsList[0] = 5;

The next line assigns the value of the 0 index to the 1 index.

So, we have:

yearsList[0] = 5;

yearsList[1] = 5;

The next line assigns 10 to the 0 index.

So, we have:

yearsList[0] = 10;

yearsList[1] = 5;

The next line assigns the value of the 1 index to the 2 index.

So, we have:

yearsList[0] = 10;

yearsList[1] = 5;

yearsList[2] = 5;

Hence, the ending contents of the array are 10, 5, 5

Read more about arrays at:

https://brainly.com/question/22364342

ACCESS MORE