Welcome to Westonci.ca, the place where your questions find answers from a community of knowledgeable experts. Join our platform to connect with experts ready to provide accurate answers to your questions in various fields. Experience the ease of finding precise answers to your questions from a knowledgeable community of experts.

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.


Sagot :

the answer would be c

Answer:

C

Explanation:

good luck on AP bro