Skip to content
Quiz · Arrays · lesson 5 of 9

Quiz — two names, one array

What does the program print (lines separated by spaces)?

C#
int[] a = [1, 2, 3];
int[] b = a;
b[0] = 10;
b = [7, 8];
Console.WriteLine(a[0]);
Console.WriteLine(b[0]);