执行以下程序段后、变量a,b,c的值分别是( )。int x=6,y=5;int a,b,c;a=(--x==y++)?--x:++y;b=x++;c=y;
A. a=4,b=5,c=7
B. a=4,b=4,c=6
C. a=5,b=6,c=5
D. a=7,b=6,c=7
查看答案
设x=2,y=3,z=4,k=5,则表达式“x
A. 1
B. 2
C. 3
D. 4
程序代码如下: #include int main(){int a,b;printf("please input a and b:\n");scanf("%d%d",&a,&b);printf("the output data is %d\n",a7<回车>则程序输出为
A. the output data is 0
B. the output data is 1
C. the output data is 2
D. the output data is 7
下列复合语句中,不能实现两数交换的是
A. { b = a * b; a = b / a; b = b / a; }
B.{ a=b; b=a; }
C.{ t=a; a=b; b=t; }
D.{ a = a + b; b = a – b; a = a – b; }
main(){inta=2,b=-1,c=2;if(a==b) c--;elsec++;printf("%d\n",c);}
A. 0
B. 1
C. 2
D. 3