What will be the output of the below code segment?

class Program
{
static void Main(string[] args)
{
new List<string>() { "apple", "tomato", "grapes", "potato" }
.Intersect(new List<string>() { "apple", "mango", "grapes", "sky" })
.ToList()
.ForEach(i => Console.Write(i+" "));

Console.ReadKey(true);
}
}

 Posted by Rajnilari2015 on 10/24/2015 | Category: C# Interview questions | Views: 2901 | Points: 40
Select from following answers:
  1. tomato potato
  2. apple grapes
  3. mango sky
  4. apple grapes mango sky
  5. All Above

Show Correct Answer


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response