设有以下程序段:inta=5,b=8,temp;if(a==b){temp=a;a=b;b=temp;}程序执行后,a和b的值是多少?
A. 5,5
B. 5,8
C. 8,8
D. 8,5
查看答案
下列程序段的输出结果是:inta=2,b=-1,c=2;if(a
A. 0
B. 1
C. 2
D. 3
如果有程序段:intscore;scanf("%d",&score);if(score>=90)printf("A\n");elseif(score>=80)printf("B\n");elseif(score>=60)printf("C\n");elseprintf("E\n");如果输入78,则输出为:
A
B
C
D. E
如果有程序段:intscore;scanf("%d",&score);switch(score/10){case9:printf("A\n");break;case8:printf("B\n");break;case7:printf("C\n");break;case6:printf("D\n");break;dufault:printf("E\n"); }如果输入78,则输出为:
A
B
C
D
E
如果有程序段:intscore;scanf("%d",&score);switch(score/10){case9:printf("A");case8:printf("B");case7:printf("C");case6:printf("D");dufault:printf("E");}如果输入78,则输出为:
A. C
B. ABC
CDE
DE