Complete the code to declare an array of integers.
int[] numbers = new int[[1]];The number inside the brackets specifies the size of the array, which is 5 here.
Complete the code to access the first element of the array.
int firstNumber = numbers[1];Arrays in C# use square brackets to access elements by index, starting at 0.
Fix the error in the code to assign a value to the second element of the array.
numbers[1] = 10;
To assign a value to an array element, use square brackets with the index.
Fill both blanks to create an array of strings with 3 elements.
string[] fruits = new string[[1]] {"apple", "banana", [2];
The array size is 3, and the third element is "orange".
Fill all three blanks to create an array of doubles and assign values.
double[] temperatures = new double[[1]] { [2], [3], 23.5 };
The array size is 3, and the first two values are 20.0 and 18.7.
