main() { char c1,c2; c1='A'+'8'-'4'; c2='A'+'8'-'5'; printf("%c,%d\n",c1,c2); } It is known that the ASCII code of letter A is 65, and the output of the program is ( )
A. E,68
B. D,69
C. E,D
D. Output has no fixed value
查看答案
main () {int a=1,b=2; while (a<6) {b+=a; a+=2; b%=10;} printf(“%d,%d\n”,a,b); } the output of the program is ( )
A. 5,11
B. 7,1
C. 7,11
D. 6,1
If there are the following program segments, where s, a, b, c are defined as integer variables, and a and c are assigned values (c is greater than 0) . s=a; for (b=1;b<=c;b++) s=s+1; Then the assignment statement equivalent to the function of the above program segment is ( ).
A. s=a+b;
B. s=a+c;
C. s=s+c;
D. s=b+c;
here are definitions:int a=1, b=2, c=3; the execution effect which is different from the other three is ( ).
A. if(a>b) c=a,a=b,b=c;
B. if(a>b) {c=a,a=b,b=c;}
C. if(a>b) c=a;a=b;b=c;
D. if(a>b) {c=a;a=b;b=c;}
#includeint fun(int x,int y) { if(x==y) return(x); else return((x+y)/2); }main() { int a=4,b=5,c=6; printf("%d\n",fun(2*a,fun(b,c))); } The output of the program is ( )
A. 3
B. 6
C. 8
D. 12