若有定义: float w; int a, b; 则合法的switch语句是
A) switch(w) B) switch(a);
{ case 1.0: printf("*\n"); { case 1 printf("*\n");
case 2.0: printf("**\n"); case 2 printf("**\n");
} }
C) switch(b) D) switch(a+b);
{ case 1: printf("*\n"); { case 1: printf("*\n");
default: printf("\n"); case 2: printf("**\n");
case 1+2: printf("**\n"); default: printf("\n");
} }
登录后提交答案