×

Multiple-Choice Questions

Web Technologies MCQs

Computer Science Subjects MCQs

Databases MCQs

Programming MCQs

Testing Software MCQs

Digital Marketing Subjects MCQs

Cloud Computing Softwares MCQs

AI/ML Subjects MCQs

Engineering Subjects MCQs

Office Related Programs MCQs

Management MCQs

More

Which of the correct syntax to declare an array with 2 rows and 3 columns in C#?

70. Which of the correct syntax to declare an array with 2 rows and 3 columns in C#?

  1. int arr[2][3] = new int[2][3];
  2. int arr[2,3] = new int[2,3];
  3. int[,] arr = new int[2,3];
  4. int [,]arr = new [2,3]int;

Answer: C) int[,] arr = new int[2,3];

Explanation:

The correct way to declare an array with 2 rows and 3 columns in C# is:

int[,] arr = new int[2,3];

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.