[单选题]

若有定义 : float x=1.5; int a=1,b=3,c=2; 则正确的 switch 语句是

A.)

switch(x)

{ case 1.0: printf("*/n");

case 2.0: printf("**/n");}

B.)

switch((int)x);

{ case 1: printf("*/n");

case 2: printf("**/n");}

C.)

switch(a+b)

{ case 1: printf("*/n");

case 2+1: printf("**/n");}

D.)

switch(a+b)

{ case 1: printf("*/n");

case c: printf("**/n");}

参考答案与解析:

相关试题

若有定义:float x=1.5;int a=1,b=3,c=2;则正确的swi

[单选题]若有定义:float x=1.5;int a=1,b=3,c=2;则正确的switch语句是( )。A.switch(x)B.switch((int)x); {case 1.0:printf("*/n"); {case 1:printf("*/n"); case 2.0:printf("**/n");} case 2:printf("**/n");}C.switch(a+B)D.switch(a+B){case 1;printf("*/n"); {case 1:printf(

  • 查看答案
  • 若有定义:float x=1.5;int a=1,b=3,c=2;则正确的swi

    [单选题]若有定义:float x=1.5;int a=1,b=3,c=2;则正确的switch语句是( )。A.switch(x) {case 1.0:printf("*/n"); case 2.0:printf("**/n");}B.switch((int)x); {case 1:printf("*/n"); case 2:printf("**/n");}C.switch(a+B){case 1:printf("*/n"); case 2+1:printf("**/n");}D

  • 查看答案
  • 若有定义:float x=1.5;int a=1,b=3,c=2;,则正确的sw

    [单选题]若有定义:float x=1.5;int a=1,b=3,c=2;,则正确的switch语句是A.switch(x) {case 1.0:printf("*/n"); case 2.0:printf("**/n");}B.switch((int)x); {case 1:printf("*/n"); case 2:printf("**/n");}C.switch(a+B) {case 1:printf("*/n"); case 2+1:printf("**/n");}D.s

  • 查看答案
  • 若有定义float x=1.5;int a=1,b=3,c=2;,则正确的swi

    [单选题]若有定义float x=1.5;int a=1,b=3,c=2;,则正确的switch语句是A.swimh(x) {case 1.0:printf("*/n"); case 2.0:printf("**/n");}B.switch((int)x); {case 1:printf("*/n"); case 2:printf("**/n");}C.switch(a+D. {case 1:pfintf("*/n"); case 2+1:pfintf("**/n");}switc

  • 查看答案
  • 若有定义float x=1.5;int a=1,b=3,c=2;,则正确的swi

    [单选题]若有定义float x=1.5;int a=1,b=3,c=2;,则正确的switch语句是A.switch(x) {case 1.0:printf("*/n"); case 2.0:printf("**/n");}B.switch((int)x); {case1:printf("*/n"); case 2:printf("**/n");}C.switch(a+b) {case 1:printf("*/n"); case 2+1:printf("**/n");}D.swi

  • 查看答案
  • 若有定义:float x=1.5;int a=1,b=3,c=2;则正确的swi

    [单选题]若有定义:float x=1.5;int a=1,b=3,c=2;则正确的switch语句是______。A.switch (x) {case 1.0: printf("*/n"); case 2.0: printf("**/n");}B.switch ( (int)x); {case 1: printf("*/n"); case2: printf("**/n");}C.switch (a+b) {case 1:printf("*/n"); case 2+1: printf(

  • 查看答案
  • 若有定义:float x=1.5;int a=1,b=3,c=2;则正确的swi

    [单选题]若有定义:float x=1.5;int a=1,b=3,c=2;则正确的switch语句是( )。

  • 查看答案
  • 若有定义:float x=1.5;int a=1,b=3,c=2;则正确的swi

    [单选题]若有定义:float x=1.5;int a=1,b=3,c=2;则正确的swish语句是( )。

  • 查看答案
  • 若有定义:int a=4, b=5;float x=3.4,y=2.1;,则下列

    [单选题]若有定义:int a=4, b=5;float x=3.4,y=2.1;,则下列表达式的值为( )。 (float) (a+b)/2+(int)x%(int)yA.5.5B.55C.5.5D.55

  • 查看答案
  • 若有定义:int a=4,b=5;float x=3.4,y=2.1;,则下列表

    [单选题]若有定义:int a=4,b=5;float x=3.4,y=2.1;,则下列表达式的值为( )。(float)(a+b) /2+(int)x%(int)yA.5.5B.55C.5.500000D.55.00000

  • 查看答案
  • 若有定义 : float x=1.5; int a=1,b=3,c=2; 则正确