Tuesday 13 December 2011

17. Which of the following statements are correct about the C#.NET code snippet given below?

int[ , ] intMyArr = {{7, 1, 3}, {2, 9, 6}};
1.intMyArr represents rectangular array of 2 rows and 3 columns.
2.intMyArr.GetUpperBound(1) will yield 2.
3.intMyArr.Length will yield 24.
4.intMyArr represents 1-D array of 5 integers.
5.intMyArr.GetUpperBound(0) will yield 2.
A. 1, 2
B. 2, 3
C. 2, 5
D. 1, 4
E.  3, 4
Answer: Option A