Question
namespace CompSciBitsConsoleApplication
{
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;
}
}
}
}
a.
red
b.
blue
c.
0
d.
1
Posted under C# programming
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What is the output of the C#.NET code snippet given below?
Similar Questions
Discover Related MCQs
Q. Which of the following statements is correct?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond C# programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!