Vidyalelo
C# Programming · Q63

LINQ (Language

Programming · C# Programming · question 63

Q63

What will be the output of the following C# code snippet? static void Main() int[] nums = 1, 2, 3, 4, 5 ; Console.Write("Original order: "); foreach(int i in nums) Console.Write(i + " "); Array.Reverse(nums); Console.Write("Reversed order: "); foreach(int i in nums) Console.Write(i + " "); Console.WriteLine();

A.
Run time error
B.
5, 4, 3, 2, 1
Answer
C.
Compile time error
D.
None of the mentioned

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board