Vidyalelo
C# Programming · Q48

LINQ (Language

Programming · C# Programming · question 48

Q48

What will be the output of the following C# code snippet? class Program static void Main(string[] args) int[] nums = 1, -2, 3, 0, -4, 5 ; var posNums = nums.Where(n => n r%3); Console.Write("The values in nums: "); foreach (int i in posNums) Console.Write(i + " "); Console.WriteLine(); Console.ReadLine();

A.
Compile time error
B.
Run time error
C.
1 -2 0 0 -1 2
Answer
D.
2 -1 0 0 -2 1

Answer: Option C

Solution

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