What will be the output of

using System;
using System.Text;
using System.Linq;

public class Test
{
public static void Main()
{
Console.WriteLine(new string(
"10100101001"
.Take(5)
.Select(s => s == '0' ? '1' : '0')
.Concat("10100101001".Skip(5))
.ToArray()));
}
}

 Posted by Rajnilari2015 on 1/24/2016 | Category: C# Interview questions | Views: 3533 | Points: 40
Select from following answers:
  1. 01011101001
  2. 10100010110
  3. 01010101001
  4. 01001101001
  5. All Above

Show Correct Answer


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response