11
What is the output of the following program?
var a = new[] { 1, 2, 3, 4 };
Console.WriteLine(a[^1] + a[0]);DiscussHard
Loading subject content…
Loading practice questions…
What is the output of the following program?
var a = new[] { 1, 2, 3, 4 };
Console.WriteLine(a[^1] + a[0]);What is the output of the following program?
int[] a = { 2, 4, 6, 8 };
Console.WriteLine(Array.IndexOf(a, 6));What is the output of the following program?
int[] a = { 5, 10, 15 };
Console.WriteLine(a[a.Length - 1]);What is the output of the following program?
int[] a = { 3, 1, 2 };
Array.Sort(a);
Console.WriteLine(string.Join(",", a));What is the output of the following program?
int[] a = { 7, 3, 9 };
Console.WriteLine(a.Max() - a.Min());