Question:Consider on following declaring of enum.
(i) enum cricket {Gambhir,Smith,Sehwag}c;
(ii) enum cricket {Gambhir,Smith,Sehwag};
(iii) enum {Gambhir,Smith=-5,Sehwag}c;
(iv) enum c {Gambhir,Smith,Sehwag};
Choose correct one:
A Only (i) is correct declaration
B Only (i) and (ii) is correct declaration
C Only (i) and (iii) are correct declaration
D Only (i),(ii) and are correct declaration
E All four are correct declaration
+ ExplanationSyntax of enum data type is:
enum []{
[=],
…
} [,…]
Note:
[] : Represents optional .<>: Represents any valid c identifier