当前位置: 答题翼 > 问答 > 远程教育 > 正文
目录: 标题| 题干| 答案| 搜索| 相关
问题

若有以下变量定义:float x; int a b;则正确的switch语句是( )。


若有以下变量定义:float x; int a,b;则正确的switch语句是()。

A、switch(a+b){ case 1:printf("*/n");case 2*a:printf("* */n");}

B、switch(x){ case 1.0:printf("*/n");case 2.0:printf("* */n");}

C、switch(x){ case 1,2:printf("*/n");case 3:printf("* */n");}

D、switch(a+b){ case 1:printf("*/n");case 1+2:printf("* */n");}

参考答案
您可能感兴趣的试题
  • 若有定义:int a=4,b=5;float x=3.4,y=2.1;,则下列表达式的值为() (float) (a+b)/2+(int)×%(int)y

  • 设已有定义:float x; 则以下对指针变量P进行定义且赋初值的语句中正确的是( )。A.int*p=(floa

  • 若有以下定义:char a;int b;float c;double d;则表达式a*b+d-c值的类型为( )。A.A. float ###SXB#

  • 若有定义:int a=2 b=3;float x=3.5 y=2.5;则下面表达式的值为______。(float)(a+b)/2+(int)x%(int

  • 若有定义float X=1.5;int a=1 b=3 C=2; 则正确的switch语句是( )。A. B. C.

  • 若有定义:int a=7;float x=2.5 y=4.7;则表达式x+a%3 (int)(x+y)%2/4的值是()。A.2.5B.2.75C.3.5D.