subject

A two-dimensional array myArray is to be created with the following contents. {{0, 0, 3},

{0, 0, 0},

{7, 0, 0}}

Which of the following code segments can be used to correctly create and initialize myArray ?

I. int myArray[][] = new int[3][3];
myArray[0][2] = 3;
myArray[2][0] = 7;

II: int myArray[][] = new int[3][3];
myArray[0][2] = 7;
myArray[2][0] = 3;

III: int myArray[][] = {{0, 0, 3}, {0, 0, 0}, {7, 0, 0}};

A) I only.

B) II only.

C) III only.

D) I and III.

E) II and III.

ansver
Answers: 2

Another question on Advanced Placement (AP)

question
Advanced Placement (AP), 26.06.2019 09:30
Drag each label to the correct location. claire had a heavy breakfast early in the morning. then she went to the gym to exercise. after the gym, claire went to class. while exercising, the body requires a continuous supply of energy and uses up blood sugar at a faster rate. how will hormones maintain the sugar balance in the body from breakfast until claire has lunch?
Answers: 1
question
Advanced Placement (AP), 27.06.2019 07:00
You inherit $500,000 from your parents and want to use the money to supplement your retirement. you receive the money on your 65th birthday, the day you retire. you want to withdraw equal amounts at the end of each of the next 25 years. what constant amount can you withdraw each year and have nothing remaining at the end of 25 years if you are earning 6% interest per year? a. $20,000 b. $28,489 c. $33,574 d. $39,113
Answers: 1
question
Advanced Placement (AP), 28.06.2019 12:40
Which technique would most probably involve using a magna brush to detect a latent print?
Answers: 1
question
Advanced Placement (AP), 28.06.2019 21:30
What is a guest worker? someone who crosses national boundaries to find a permanent job someone who pays a sponsor for the cost of immigration to the country a person who has a daily commute into one country to work but lives in another country an internally displaced person who finds work in a neighboring region someone who is only allowed into another country temporarily for work purposes
Answers: 1
You know the right answer?
A two-dimensional array myArray is to be created with the following contents. {{0, 0, 3},
Questions
question
Mathematics, 05.05.2020 10:57
question
Mathematics, 05.05.2020 10:57
question
Biology, 05.05.2020 10:57
Questions on the website: 13722359