以下对枚举类型名的定义中正确的是()。
A: enum a {"sum","mon","tue"};
B: enum a={sum,mon,tue};
C: enum a={"sum","mon","tue"};
D: enum a {sum=9,mon=-1,tue};
A: enum a {"sum","mon","tue"};
B: enum a={sum,mon,tue};
C: enum a={"sum","mon","tue"};
D: enum a {sum=9,mon=-1,tue};
举一反三
- 以下对枚举类型名的定义中正确的是: A: enum a{sum=9,mon=-1,tue}; B: enum a={sum,mon,tue}; C: enum a={"sum","mon","tue"}; D: enum a{"sum","mon","tue" }
- 对枚举类型名的定义enum a {sum=9,mon=-1,tue};是正确的.
- 以下关于枚举类型的声明正确的是_____ A: enum day={mon,tue,wed,thu,fri,sat,sun}; B: enum day{mon=1,tue,wed,thu,fri,sat,sun}; C: enum day{mon;tue;wed;thu;fri;sat;sun}; D: enum day{mon,tue,wed,thu,fri,sat,mon};
- 以下关于枚举类型的使用,正确的是_____ A: enum{mon, tue, sat, thu, fri, wed, sun} day_1; B: enum BOOL{NO, YES};BOOL judge = NO;BOOL decision = 1; C: 有如下定义:enum MONTH{JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC}mon;mon=MAY;语句 printf("%s\n", mon); 将输出“MAY” D: enum WEEKDYA{Sun=7, Mon=1, Tue, Wed, Thu, Fri, Sat }day;Tue=3;day=Tue;
- 以下关于枚举变量定义错误的是 A: enumweek{sun,mon,tue,wed,thue,fri,sat}weektest; B: enum{sun,mon,tue,wed,thue,fri,sat}weektest; C: enumweek{sun,mon,tue,wed,thue,fri,sat};enumweek weektest; D: enumweek{sun,mon,tue,wed,thue,fri,sat};