Examveda

What will be the output of the following C# code?
enum days:int
{
    sunday = -3,
    monday,
    tuesday
}
Console.WriteLine((int)days.sunday);
Console.WriteLine((int)days.monday);
Console.WriteLine((int)days.tuesday);

A. -3 0 1

B. 0 1 2

C. -3 -2 -1

D. sunday monday tuesday

Answer: Option C


Join The Discussion

Related Questions on Classes and Objects in C Sharp