Arrays And Strings In C Sharp - Study Mode
[#106] What is the correct way to declare a string array in C#?
Correct Answer
(A) string[] colors
[#107] How do you access the first element of an array named 'numbers' in C#?
Correct Answer
(D) numbers[0]
[#108] What is the correct way to initialize an array of integers with values {1, 2, 3} in C#?
Correct Answer
(C) int[] numbers = {1, 2, 3}
[#109] How do you find the number of elements in an array named 'values' in C#?
Correct Answer
(C) values.Length
[#110] What is the correct syntax to declare and initialize a 2D array in C# with dimensions 3x3?
Correct Answer
(D) int[,] matrix = new int[3,3]