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

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

1

30

1 -2

死循环

2、以下c语言函数声明中,不正确的是:

void fun (int x, int y);

fun (int x, int y);

int fun (int x,y);

char *fun (char *s);

3、不能把字符串:Hello! 赋给数组b的语句是

char b[10]={'H','e','l','l','o','!'};

char b[10];  b="Hello!";

char b[10];  strcpy(b,"Hello!");

char b[10]="Hello!";

4、下列程序的输出结果是。
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

5、设有以下说明语句
struct ex
{ int x ; float y; char z ;} example;
则下面的叙述中不正确的是

struct结构体类型的关键字

example是结构体类型名

x,y,z都是结构体成员名

struct ex是结构体类型

6、若有以下的定义:
int a[]={1,2,3,4,5,6,7,8,9,10},*p=a
则值为3的表达式是

p+=2,*(p++)

p+=2,*++p

p+=3,*p++

p+=2,++*p

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

M = = 0

M = = 1

M ! = 0

M ! = 1

8、执行下列语句中,sum变量的值是:
int sum=0
for(int i=0;i<10;i++,sum+=i);

45

55

0

编译错误

9、若a为int类型,且其值为3,则执行完表达式a+=a-=a*a后,a的值是

-3

9

-12

6

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

9

7

5

以上均不是