Complete the code to declare an integer array of size 3.
int[] numbers = new int[[1]];The array size is specified inside the brackets when creating a new array. Here, the size is 3.
Complete the code to assign the value 10 to the first element of the array.
numbers[[1]] = 10;
Array indexes in C# start at 0, so the first element is at index 0.
Fix the error in the code to copy the reference of the array correctly.
int[] copy = [1];Assigning one array variable to another copies the reference, so both point to the same array.
Fill both blanks to show that changing the copy affects the original array.
copy[[1]] = 20; Console.WriteLine(numbers[[2]]);
Since both variables reference the same array, changing one affects the other at the same index.
Fill all three blanks to create a new array copy and change it without affecting the original.
int[] newCopy = new int[numbers.Length]; Array.[1](numbers, newCopy, numbers.[2]); newCopy[[3]] = 30; Console.WriteLine(numbers[1]);
Using Array.Copy copies elements to a new array. Changing newCopy does not affect numbers.