- Online Exam Test Papers | - MCQs[multiple choice questions and answers ] | - Mock Test Papers | - Practice Papers | - Sample Test Papers |

Question:
What is the output of the C#.NET code snippet given below?namespace IndiabixConsoleApplication
{
    public enum color
    { red, green, blue };
    
    class SampleProgram
    {
        static void Main (string[ ] args)
        {
            color c = color.blue;
            switch (c)
            {
                case color.red:
                    Console.WriteLine(color.red); 
                    break; 
                
                case color.green: 
                    Console.WriteLine(color.green); 
                    break; 
                
                case color.blue: 
                    Console.WriteLine(color.blue); 
                    break; 
            } 
        } 
    } 
}

1.red

2.blue

3.0

4.1

Posted Date:-2021-02-20 14:28:12


More MCQS Questions and answers

Search