设int型变量a、b,float型变量x、y,char型变量ch均已正确定义并赋值,正确的switch语句是()

设int型变量a、b,float型变量x、y,char型变量ch均已正确定义并赋值,正确的switch语句是()

A.switch(x y){......}

B.switch(ch 1){......}

C.switchch{......}

D.switch(a b);{......}

正确答案:switch(ch 1){......}

猜你喜欢