定义行星枚举类型,枚举常量从1开始编号,请填写下面的空格(不要添加多余的空格) enum Planet{Mercury= , Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune}
1
举一反三
- Which planet is the closest planet to the sun, Mercury, Mars, Venus or Jupiter
- Which planet is the easiest for people to see in the sky, Earth, Mercury, Venus or Jupiter
- The Vega and Altair, together with five major stars, Mercury, Mars, Jupiter, Venus, and Saturn, are called the Seven Luminaries.
- The Vega and Altair, together with five major stars, Mercury, Mars, Jupiter, Venus, and Saturn, are called the Seven Luminaries.
- 中国大学MOOC: 定义一个新的字符类型别名CHAR,请填写空白处(注意不要添加多余的空格 )typedef CHAR;
内容
- 0
对于枚举类型描述正确的是? A: 枚举类型必须通过Enum继承实现 B: 通过enum定义类型可被继承 C: 枚举类型数据无法被继承 D: 定义枚举类型时,不能在枚举中定义方法
- 1
假定一个枚举类型的定义为“enum RB{ab,ac,ad,ae};”,则枚举常量ad的值为()。
- 2
对于声明枚举类型enum,枚举元素按常量处理,可以对它们赋值
- 3
对于枚举类型的定义语句enum Color{Blue,Green=3,Black,White=6,Red};其中枚举常量Red的值为______。
- 4
已知枚举类型定义语句为:enum tok{ name, number, plus=5, minus, print=10};则枚举常量minus的值为______ .