Vidyalelo
C# Programming · Q80

LINQ (Language

Programming · C# Programming · question 80

Q80

What will be the output of the following C# code snippet? class Program static void Main(string[] args) Expression > IsFactorExp = (n, d) => (d != 0) ? (n % d) == 0 : false; Func IsFactor = IsFactorExp.Compile(); if (IsFactor(10, 5)) Console.WriteLine("5 is a factor of 10."); if (!IsFactor(343, 7)) Console.WriteLine("7 is not a factor of 10."); Console.ReadLine();

A.
Compile time error
B.
Run time error
C.
5 is a factor of 10
7 is not a factor of 10
D.
5 is a factor of 10
Answer

Answer: Option D

Solution

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