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

1、若有以下程序片段: char str[ ]="ab\n2\\"; printf("%d",strlen(str)); 上面程序片段的输出结果是

3

4

6

12

2、以下关于typedef的叙述中错误的是:

用typedef可以增加新的类型

用typedef可以定义各种类型名,但不能用来定义变量

用typedef只是将已有的类型用新的标识符来代表

使用typedef有利于程序的通用和移植

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

M = = 0

M = = 1

M ! = 0

M ! = 1

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

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)

5、下述程序段的输出结果是?
int x=10;
t y=x++;
printf(″%d,%d″,(x++,y),y++);

11,10

11,11

10,10

10,11

6、下列程序段的输出结果是
void fun(int *x, int *y)
{ printf("%d %d", *x, *y); *x=3; *y=4;}
main()
{ int x=1,y=2;
fun(&y,&x);
printf("%d %d",x, y);
}

2 1 4 3

1 2 1 2

1 2 3 4

2 1 1 2

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

1

3 0

1 -2

死循环

8、函数调用:strcat(strcpy(str1,str2),str3)的功能是

将串str1复制到串str2中后再连接到串str3之后

将串str1连接到串str2之后再复制到串str3之后

将串str2复制到串str1中后再将串str3连接到串str1之后

将串str2连接到串str1之后再将串str1复制到串str3中

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

2,M

3,E

2,E

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

10、函数调用语句func((exp1,exp2),(exp3,exp4,exp5));中,实参的个数为:

1

2

4

5