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 All four are correct declaration
E Only (i),(ii) and are correct declaration
+ ExplanationSyntax of enum data type is:enum []{
[=],
…
} [,…]
Note:
[] : Represents optional .<>: Represents any valid c identifierAuthor: