?
What will be the output of the following C# code?
What will be the output of the following C# code?
static void Main(string[] args)
{
int temp = 1;
switch (temp << 2 + temp)
{
default:
Console.WriteLine("Example1");
break;
case 4:
Console.WriteLine("Example2");
break;
case 5:
Console.WriteLine("Example3");
break;
case 8:
Console.WriteLine("Example4");
break;
}
Console.ReadLine();
}
static void Main(string[] args)
{
int temp = 1;
switch (temp << 2 + temp)
{
default:
Console.WriteLine("Example1");
break;
case 4:
Console.WriteLine("Example2");
break;
case 5:
Console.WriteLine("Example3");
break;
case 8:
Console.WriteLine("Example4");
break;
}
Console.ReadLine();
}
Join the Discussion
Login to post a comment or share your explanation.
Login