请高手帮我解决一下这道题,谢谢!
若有定义;floatx=1.5;inta=1,b=3,c=2:则正确的switch语句为()Aswitch(x){case1.0;printf(“*\n");case2....
若有定义;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 2:printf("**\n");}
请简略的说一下过程,谢谢!! 展开
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 2:printf("**\n");}
请简略的说一下过程,谢谢!! 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询