已知:int x,a,b;下列选项中错误的if语句是( )。
A. if(a=b) x++;
B. if(a= C. if(a-b) x++;
D. if(x) x++;
若有定义: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.0: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");}