What will be the output of the following C# code? [code] static void Main(string[] args) { switch (5) { case 5.0f:

What will be the output of the following C# code?
Code:
  static void Main(string[] args)
  {
      switch (5)
      {
      case 5.0f: 
          Console.WriteLine("harsh");
          break;
      case 5: 
          Console.WriteLine("amish");
          break;
      case 5.0L: 
          Console.WriteLine("ANKIT");
          break;
      default:
          Console.WriteLine("ashish");
      }
      Console.ReadLine();
   }
A. amish
B. ANKIT
C. harsh
D. Compile time error
 

Tìm kiếm

Back
Top