subject

What is stored in alpha after the following code executes?

int[] alpha = new int[5];
int j;

for (j = 0; j < 5; j++)
{
alpha[j] = j + 1;

if (j > 2)
alpha[j - 1] = alpha[j] + 2;
}

1. alpha = {1, 2, 3, 4, 5}
2. alpha = {4, 5, 6, 7, 9}
3. alpha = {1, 5, 6, 7, 5}
4. none of these

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:30
You are almost finished updating a web site. as part of the update, you have converted all pages from html 4.0 to html5. the project is currently on schedule. however, your project manager has been asked by the marketing team manager to justify a day of time spent validating the site's html5 pages. the marketing team manager does not have technical knowledge of the internet or the web. which is the most appropriate explanation to provide to the marketing team manager?
Answers: 1
question
Computers and Technology, 24.06.2019 22:30
Telling a computer that is already on to turn again is known as what type of boot?
Answers: 1
question
Computers and Technology, 25.06.2019 00:30
How do i take a screenshot on a laptop?
Answers: 2
question
Computers and Technology, 25.06.2019 01:40
The instantiation of an endpoint in a potential tcp connection is know as
Answers: 1
You know the right answer?
What is stored in alpha after the following code executes?

int[] alpha = new int[5];
Questions
question
Mathematics, 17.02.2021 19:20
question
Mathematics, 17.02.2021 19:20
question
English, 17.02.2021 19:20
question
World Languages, 17.02.2021 19:20
question
Mathematics, 17.02.2021 19:20
question
Arts, 17.02.2021 19:20
question
Social Studies, 17.02.2021 19:20
Questions on the website: 13722359