Given the declaration: float w; int a, b; , which one of the following is a legal switch statement?
A.switch (a); { case 1:printf("*\n"); case 2:printf("**\n"); } B.switch (b) { case 1:printf("*\n"); default:printf("\n"); case 1+2:printf("**\n"); } C.switch (a+b); { case 1:printf("*\n"); case 2:printf("**\n"); default:printf("\n"); } D.switch (w) { case 1.0:printf("*\n"); case 2.0:printf("**\n"); }