单选题:下列条件语句中,功能与其他语句不同的是()。
下列条件语句中,功能与其他语句不同的是()。
A.if(a)printf("%d \n", x); else printf("%d \n", y);
B.if(a == 0) printf("%d \n" , y); else printf("%d \n", x);
C.if(a != 0) printf("%d \n" , x); else printf("%d \n",y);
D.if(a == 0) printf("%d \n" , x); else printf("%d \n", y);
答案:D
A.if(a)printf("%d \n", x); else printf("%d \n", y);
B.if(a == 0) printf("%d \n" , y); else printf("%d \n", x);
C.if(a != 0) printf("%d \n" , x); else printf("%d \n",y);
D.if(a == 0) printf("%d \n" , x); else printf("%d \n", y);
答案:D