Find answers to your questions and expand your knowledge with IDNLearn.com. Ask anything and receive comprehensive, well-informed responses from our dedicated team 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

Thank you for joining our conversation. Don't hesitate to return anytime to find answers to your questions. Let's continue sharing knowledge and experiences! IDNLearn.com provides the answers you need. Thank you for visiting, and see you next time for more valuable insights.