Vidyalelo
C# Programming · Q85

LINQ (Language

Programming · C# Programming · question 85

Q85

What will be the output of the following C# code snippet? class Program static void Main(string[] args) string[] strs = "alpha", "beta", "gamma"; var chrs = from str in strs let chrArray = str.ToCharArray() from ch in chrArray orderby ch select ch; Console.WriteLine("The individual characters in sorted order:"); foreach (char c in chrs) Console.Write(c + " "); Console.WriteLine(); Console.ReadLine();

A.
a a l h a b g m m a p e t a
B.
a a a a a b e g h l m m p t
Answer
C.
a g h l m m p t a a a a b e
D.
Run time error

Answer: Option B

Solution

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