![](https://static.youtibao.com/asksite/comm/pc/images/content_title_q.png)
若有以下定義:floatx;inta,b,c=2;,則正確的switch語句是()A.switch(x) { case 1.0:printf("*\n")
若有以下定義:float x;int a,b,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 1+2:printf("**\n"); }
D.switch(a+B){ case 1:printf("*\n"); case c:printf("**\n"); }
![](https://static.youtibao.com/asksite/comm/pc/images/content_title_a.png)