1
三?/p>
程序填空?/p>
第一?/p>
C
语言基础知识
?/p>
C
语言概述、算法、数据类?/p>
运算?/p>
表达式、位运算?/p>
1
以下程序不用第三个变量实现两个数对调的操作?/p>
#includ
?/p>
stdio.h
?/p>
main()
{
int a,b;
scanf("%d,%d",&a,&b);
a=<
a+b
>;(
三个字符
)
b=<
a-b
>;(
三个字符
)
a= a-b;
printf("%d,%d",a,b);
}
2
、选择程序的运行结?/p>
?/p>
main ( )
{ int x=1, y=2, z, a, b, c, d;
z = ++x||++y;
printf("x=%d\n", x);
printf("y=%d\n", y); /*
输出结果
<
y=2
>(
三个字符
) */
a=-1; b=-2; c=++a&&b++;
printf("b=%d\n", b); /*
输出结果
<
b=-2
> (
三个字符
)*/ }
3
以下程序的结果为
_______
main()
{
unsigned int a=3, b=10;
printf("%d\n",a<<2|b>>1); /*
输出结果
<
14
> */
printf("%d\n",a<<2&b>>1); /*
输出结果
<
0
> */
}
4
?/p>
x=3,y=z=4
,则下列表达式的值是?/p>
(1)
(z>=y>=x)? 1:0
/*
值为
<
0
> */
(2)
z>=y&&y>=x