Sail E0 Webinar
Question
Choose the correct output for given set of code?
enum per {     a,      b,      c,      d,  } per.a = 10; Console.writeline(per.b);
Options:
A .  11
B .  1
C .  2
D .  compile time error
Answer: Option D


It will report an error since enum element cannot be assigned a value outside the enum declaration.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers