adplus-dvertising
frame-decoration

Question

Select the output for the following set of Code:
static void Main(string[] args)
  {
      char ch = 'p';
      switch (ch)
      {
      case 'p':
          Console.WriteLine("coco" + "\t" + Convert.ToInt32(ch));
          break;
      default:
          Console.WriteLine("default");
          break; 
     }
     Console.WriteLine("main");
  }

a.

coco main

b.

coco 112

c.

coco 112 main

d.

compile time error

Posted under C# programming

Answer: (c).coco 112 main

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: