Looking for trustworthy answers? Westonci.ca is the ultimate Q&A platform where experts share their knowledge on various topics. Explore comprehensive solutions to your questions from a wide range of professionals on our user-friendly platform. Get immediate and reliable solutions to your questions from a community of experienced professionals on our platform.

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