Arrays

Q1:
Which of the following statements are correct about the C#.NET code snippet given below?
   int[][]intMyArr = new int[2][]; 
   intMyArr[0] = new int[4]{6, 1, 4, 3}; 
   intMyArr[1] = new int[3]{9, 2, 7};

A intMyArr is a reference to a 2-D jagged array.

B The two rows of the jagged array intMyArr are stored in adjacent memory locations.

C
intMyArr[0] refers to the zeroth 1-D array and intMyArr[1] refers to the first 1-D array.

D
intMyArr refers to intMyArr[0] and intMyArr[1].

E
intMyArr refers to intMyArr[1] and intMyArr[2].

ANS:C -

intMyArr[0] refers to the zeroth 1-D array and intMyArr[1] refers to the first 1-D array.

No answer description is available. Let's discuss.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.