adplus-dvertising
frame-decoration

Question

Select the output for the following set of code.
 static void Main(string[] args)
  {
      int movie = 1;
      switch (movie << 2 + movie)
      {
      default: 
          Console.WriteLine("3 Idiots");
          break;
      case 4: 
          Console.WriteLine("Ghazini");
          break;
      case 5: 
          Console.WriteLine("Krishh");
          break;
      case 8: 
          Console.WriteLine("Race");
          break;
      }
      Console.ReadLine();
  }

a.

3 Idiots

b.

Ghazini

c.

Race

d.

Krishh

Posted under C# programming

Answer: (c).Race

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Select the output for the following set of code.