What is the output of the code snippet given below?

class Program
{
    static void Main(string[] args)
    {
        double[] myArr = { 12.56, 12.34, 13 };
        foreach (double number in myArr)
        {
            Console.WriteLine("First statement in the loop");
            switch (Convert.ToInt32(number))
            {
                case 12:
                    Console.WriteLine("Case 12");
                    continue;

                case 13:
                    Console.WriteLine("Case 13");
                    break;
            }
            Console.WriteLine("Last statement in the loop");
        }
    }
}

 

First statement in the loop Case 12 First statement in the loop Case 12 First statement in the loop Case 13 Last statement in the loop
First statement in the loop Case 12 Last statement in the loop First statement in the loop Case 12 Last statement in the loop First statement in the loop Case 13 Last statement in the loop
First statement in the loop Case 13 Last statement in the loop First statement in the loop Case 12 First statement in the loop Case 13 Last statement in the loop
First statement in the loop Case 13 Last statement in the loop First statement in the loop Case 12 Last statement in the loop First statement in the loop Case 13 Last statement in the loop
Verified Answer
Correct Option - c

To get all Infosys Certified CSharp Programmer Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee

Telegram