C MCQ Quiz Hub

Choose a topic to test your knowledge and improve your C skills

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





✅ Correct Answer: 1

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.





✅ Correct Answer: 2

Which one of the following statements is correct?





✅ Correct Answer: 4

If a is an array of 5 integers then which of the following is the correct way to increase its size to 10 elements?





✅ Correct Answer: 4