题目内容
(请给出正确答案)
[单选题]
设int型变量a、b,float型变量x、y,char型变量ch均已正确定义并赋值,则正确的swith语句是()。
A.switch (x+y) {...}
B.switch (ch+1) {...}
C.switch ch {...}
D.switck (a+b) {...}
答案
查看答案
A.switch (x+y) {...}
B.switch (ch+1) {...}
C.switch ch {...}
D.switck (a+b) {...}
第1题
A.switch(x+y){……}
B.switch(ch+1){……}
C.switch ch{……}
D.switch(a+b):{……}
第6题
A.int
B.long
C.double
D.char
第7题
A.ch='123';
B.ch='\xff';
C.CH='\08';
D.ch="\";
第8题
A.C语言的整型变量可以分为int、short、long、unsigned int、unsigned short、unsigned long等几种类型,因此整型常量也可以分为这几种类型
B.C语言的字符数据与整型数据可以互相赋值
C.若对字符型变量的定义为:char c;可使用语句c="a",对变量c赋值
D.已知x为float型,执行语句(int)x后,x为int型