写出下列程序的运行结果______ 。 # include < stdio.h> void main() { int a=10,b=20,c=30,d; d=++a<=10||b-->=20||c++; printf(“%d,%d,%d,%d\n”,a,b,c,d); }
查看答案
已有定义“int n=8;”,执行 switch(n--) { case 8: n--; case 7: n--;break; default: n--; }语句后,n的值是______ 。
已有定义“int a,b,c;”,且a=b=c=1,执行 if(a++||++b) c++;语句后,b的值是______ 。
执行以下程序段: int s=15; switch(s/4) { case 1: printf(“1”); case 2: printf(“2”); case 3: printf(“3”); default: printf(“0”); }后,输出结果是()
A. 3
B. 20
C. 30
D. 10
已知“int k=8;”,则执行 if(k<=0) if(k==0) printf(“# # # #\n“); else printf(“& & & &\n“); else printf(“* * * *\n“);语句后,输出的结果是()。
A. # # # #
B. & & & &
C. * * * *
D. 有语法错误,无输出结果