If a is an array of 5 integers then which of the following is the correct way to increase its size to 10 elements?
1.int[] a = new int[5]; int[] a = new int[10];
2.int[] a = int[5]; int[] a = int[10];
3.int[] a = new int[5]; a.Length = 10 ;
4.int[] a = new int[5]; a = new int[10];
Which of the following statements are correct about the C#.NET code snippet given below? int[] a = {11, 3, 5, 9, 4}; The array elements are created on the stack. Refernce a is created on the stack. The array elements are created on the heap. On declaring the array a new array class is created which is derived from System.Array Class. Whether the array elements are stored in the stack or heap depends upon the size of the array.
1.1,2
2.2, 3, 4
3. 2, 3, 5
4.4, 5
Which of the following statements are correct about the C#.NET code snippet given below? int[ , ] intMyArr = {{7, 1, 3}, {2, 9, 6}}; intMyArr represents rectangular array of 2 rows and 3 columns. intMyArr.GetUpperBound(1) will yield 2. intMyArr.Length will yield 24. intMyArr represents 1-D array of 5 integers. intMyArr.GetUpperBound(0) will yield 2
1.1,2
2.2,3
3.2,5
4.1,4
Which one of the following statements is correct?
1.Array elements can be of integer type only.
2.The rank of an Array is the total number of elements it can contain.
3.The length of an Array is the number of dimensions in the Array.
4. The default value of numeric array elements is zero.