如题目或答案有误,请通过BUG反馈告知我们修正,谢谢!

1、有以下程序段
int k;=0
while(k=1)k++;
while 循环执行的次数是

无限次

有语法错,不能执行

一次也不执行

执行1次

2、执行下列语句后,a的值为:
int a;
#define M(x,y) (x*y)
a=M(1+2,3);

9

7

5

以上均不是

3、下列程序的输出结果是。
int a[5]={2,4,6,8,10},*p,**k;
p=a;  k=&p;
printf("%d",*(p++));
printf("%d\n",**k);

4 4

2 2

2 4

4 6

4、设有以下定义或语句,则输出的结果是?
(用small模式编译,指针变量占2个字节)
struct date
{long *cat;
struct date *next;
double dog;
}too;
printf("%d",sizeof(too));

20

16

14

12

5、以下程序执行后sum的值是
main()
{ int i,sum;
for(i=1;i<6;i++) sum+=i;
printf("%d\n",sum);
}

15

14

不确定

0

6、有以下程序段
int x=3
do
{ printf("%d",x-=2); }
while (!(--x));
其输出结果是

1

3 0

1 -2

死循环

7、以下所列的各函数首部中,正确的是

void play(var :Integer,var b:Integer)

void play(int a,b)

void play(int a,int b)

Sub play(a as integer,b as integer)

8、对于条件表达式(M)?(a++):(a--),其中的表达式M等价于

M = = 0

M = = 1

M ! = 0

M ! = 1

9、若有以下定义和语句:
char c1='b',c2='e';
printf("%d,%c\n",c2-c1,c2-'a'+'A');
则输出结果是

2,M

3,E

2,E

输出项与对应的格式控制不一致,输出结果不确定

10、以下运算符中,运算对象必须是整型的是:

/

%=

!=

〈=