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 Computers and Technology

question
Computers and Technology, 23.06.2019 11:00
Describe three characteristics of at-risk drivers. a. b. c. describe three characteristics of safe drivers. a. b. c. describe three driver errors that could cause a collision. a. b. c. how will this information affect you as a driver now and in the future? (2-3 sentences)
Answers: 2
question
Computers and Technology, 23.06.2019 18:50
Ais a picture icon that is a direct link to a file or folder
Answers: 1
question
Computers and Technology, 23.06.2019 21:30
To move a file or folder in microsoft windows, you can click and hold down the left mouse button while moving your mouse pointer to the location you want the file or folder to be, which is also known as.
Answers: 3
question
Computers and Technology, 23.06.2019 21:40
Simon says is a memory game where "simon" outputs a sequence of 10 characters (r, g, b, y) and the user must repeat the sequence. create a for loop that compares the two strings. for each match, add one point to user_score. upon a mismatch, end the game. sample output with inputs: 'rrgbryybgy' 'rrgbbrybgy'
Answers: 3
You know the right answer?
A two-dimensional array myArray is to be created with the following contents. {{0, 0, 3},
Questions
Questions on the website: 13722360