更多"定义如下枚举类型:enum Number{one=1,tow=2,fo"的相关试题:
[单项选择]定义如下枚举类型:enum Number{one=l,tow=2,four=4,eight=8},则下列语句正确的是( )。
A. Number num=1;
B. Number num=Number(20);
C. Number num=Number(eight
D. 枚举类型Number的取值范围是0~15
[单项选择]定义如下枚举类型:enum Number{one=1,two=2,four=4,eight=8),则下列语句正确的是( )。
A. Number num=1;
B. Numbernum=Number(20);
C. Number num=Number(eight│OxF;
D. 枚举类型Number的取值范围是0~15
[单项选择]定义如下枚举类型:enum Number{one=l,two=2,fomr=4,eight=8},则枚举类型Number的取值范( )。
A. 1~8
B. 0~8
C. 1~15
D. 0~15
[单项选择]定义如下枚举类型:enum{Monday, Tuesday, Wednesday, Thrusday, Friday=2};,则下列x语句正确的是( )
A. 表达式Wednesday==Friday的值是true
B. Day day;day=3
C. Day day;day=Monday+3
D. Day day;day=Tuesday+10
[单项选择]定义如下枚举类型;enum{ Monday, Tuesday, Wednesday, Thrusday, Friday=2);,则下列语句正确的是( )。
A. 表达式Wednesday==Friday 的值是true
B. Day day;day=3
C. Day day;day=Monday+3
D. Day day;day=Tuesday+10
[单项选择]定义如下枚举类型; enum {Monday, Tuesday, Wednesday, Thrusday, Friday=2};则下列语句正确的是
A. 表达式 Wednesday == Friday 的值是 true
B. Day day; day=3;
C. Day day; day = Monday + 3;
D. Day day; day = Tuesday + 10;
[单项选择]定义如下枚举类型: enum{Monday,Tuesday,Wednesday,Thursday,Friday=2}; 则下列语句正确的是( )。
A. 表达式Wednesday==Friday的值是true
B. Dayday;day=3;
C. Dayday;day=Monday+3;
D. Dayday;day=Tuesday+10;
[单项选择]定义如下枚举类型:enum{Monday,Tuesday,Wednesday,Thrusday,Friday=2}:则下列语句正确的是
A. 表达式Wednesday==Friday的值是true
B. Day day;day=3;
C. Day day;day=Monday+3;
D. Day day;day=Tuesday+10;
[单项选择]定义如下枚举类型:enum{Monday,Tuesday,Wednesday,Thursday,Friday=2};表达式 Wednesday= =Friday的值是( )。
A. false
B. true
C. 2
D. 异常
[单项选择]
Passage Four One evening Mr. Green was driving home along a lonely country road. He had £ 100.00 in his pock et. At the loneliest part of the road, a man asked for a lift (搭车). Mr. Green told him to get into the car and continued his driving. When he talked to the man and learned that the man had been in prison for robbery and had broken out of prison two days before, Mr. Green was very worried. Suddenly he saw a police-car and had a bright idea. He just reached a small town where the speed limit (限制速度) was 30 miles an hour. But he drove the car as fast as it could go. He looked back and saw that the police-car had begun to chase (追) him. After a mile or so the police-car overtook (赶上) him and ordered him to stop. A policeman got out and came to Mr. Green’s car. Mr. Green hoped that he could tell the policeman about the escaped robber, but he felt the man had put a gun against his back. The policeman took out his notebook and pencil, saying he wanted Mr. Green’
A. a robber who robs drivers
B. a policeman who had worked in prison
C. a prisoner who had escaped from prison
D. a stranger with £ 100.00 in his pocket
[单项选择] 定义枚举如下: public enum Direction{ EAST,SOUTH,WEST,NORTH } 下列正确使用该枚举类型的语句是哪项?()
A. Direction Direction=EAST;
B. Direction direction=Direction.WEST;
C. int a- Direction.NORTH;
D. Direction direction=2;