Advanced Placement (AP)

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.

answer
Answers: 2

Other questions on the subject: Advanced Placement (AP)

image
Advanced Placement (AP), 23.06.2019 10:30, theincrediblejacob06
Giving 30 points away plus brainliest if you answer correctly if you're found to be at fault in your driver license will be canceled within 90 days unless you complete a 12-hour advanced driver improvement course, complete four hours of behind-the-wheel training, and pass the extended driving test. a. a crash that results in an injury b. a crash in a school zone c. two crashes within two years d. three crashes within three years
Answers: 2
image
Advanced Placement (AP), 24.06.2019 20:00, leianagaming
Physical needs include: a. the need for sleep b. the need to feel safe c. the need to feel secure d. all of the above
Answers: 1
image
Advanced Placement (AP), 24.06.2019 22:30, bnnnkyl22
Which excerpt from act iv of hamlet best provides evidence of the theme’s development?
Answers: 1
image
Advanced Placement (AP), 25.06.2019 19:30, Farhan54019
Ben can’t wrestle in this week’s match unless he loses two pounds. he decides to take a nap instead of exercising. this is an example of wasting time getting distracted allowing others to set goals
Answers: 1
Do you know the correct answer?
A two-dimensional array myArray is to be created with the following contents. {{0, 0, 3},

Questions in other subjects:

Konu
Mathematics, 14.02.2020 03:25
Konu
Mathematics, 14.02.2020 03:25