Vidyalelo
C# Programming · Q42

Miscellaneous in C Sharp

Programming · C# Programming · question 42

Q42

What will be the output of the following C# code snippet? class Program static void Main(string[] args) int[] nums = 3 ,1 ,2 ,5 ,4; var ltAvg = from n in nums let x = nums.Average() where n < x select n; Console.WriteLine("The average is " + nums.Average()); Console.ReadLine();

A.
Run time error
B.
3
Answer
C.
5
D.
Compile time error

Answer: Option B

Solution

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