问题
单项选择题
设int型变量a、b,float型变量x、y,char型变量ch均已正确定义并赋值,正确的switch语句是( )。
A.switch(x+{……}
B.switch(ch+1){……}
C.switch ch{……}
D.switch(a+:{……}
答案
参考答案:B
设int型变量a、b,float型变量x、y,char型变量ch均已正确定义并赋值,正确的switch语句是( )。
A.switch(x+{……}
B.switch(ch+1){……}
C.switch ch{……}
D.switch(a+:{……}
参考答案:B