三九宝宝网宝宝成长经典故事

二级C语言:数组中比较经典的11个真题

11月04日 编辑 39baobao.com

[2006年12月六级真题经典作文模板]5.(2006年12月老六级真题)Directions: For this part you are allowed 30 minutes to write a short essay entitled The Celebration of Western Festivals. You should writ...+阅读

1.一下程序

main()

{ char s[]="abcde";

s+=2;

printf("%d\n",s[0]);

}

答案:程序出错

2.一下程序

fun(int x,int y)

{ static int m=0,i=2;

i+=m+1; m=i+x+y;return m;}

main()

{ int j=1,m=1,k;

k=fun(j,m); printf("%d,",k);

k=fun(j,m); printf("%d\n",k);

}

答案:5,11

3.若有定义:char*x="abcdefghi"; ,能正确运用了 strcpy函数的是:

char y[10]; *s; strcpy(s=y+1,x+1);

4.有以下程序执行后W结果是;

int fun1(double a) {return a*a;}

int fun2(double x,double y)

{ double a=0,b

=0;

a=fun1(x); b=fun1(y);return(int)(a+b);}

main()

{ double w, w=fun2(1.1,2.0);.......}

答案:5.0

5.设函数的fun定义形式为:void fun(char ch,flaot x) {.....}

则对函数fun的调用语句是: fun(32,32);

6.已有定义char a[]="xyz",b[]={'x','y','z'};,则叙述正确的是:

a数组的长度大于b数组长度

7.一下叙述错误的是C)

A.对于double类型数组,不可以直接用数组名进行整体输入或输出

B.数组名代表的是数组所占存储区的首地址,其值不可改变

C.当程序执行中,数组元素的下标超出所定义的下标范围时,系统将给出"下标越界"的出错信息

D. 可以通过赋值的方式确定数组元素的个数

8.有以下程序:

char fun(char x,char y)

{ if (x

以下为关联文档:

2006年6月六级真题经典作文模板4.(2006年6月六级真题)Directions: For this part, you are allowed thirty minutes to write a short essay entitled Treling Abroad. You should write at least 150 words...

2005年6月六级真题经典作文模板2.(2005年6月六级真题) Directions: For this part, you are allowed thirty minutes to write a short essay entitled Say No to Pirated Products. You should write at lea...

2005年1月六级真题经典作文模板1.(2005年1月六级真题) Directions: For this part, you are allowed thirty minutes to write an open letter on behalf of the Student Union asking people to give help t...

2005年12月六级真题经典作文模板3.(2005年12月六级真题) Directions: For this part, you are allowed thirty minutes to write a letter to a pany declining a job offer. You should write at least 150 w...

俞敏洪从100套真题中提炼出的100百个经典句子1. Typical of the grassland dwellers of the continent is the American antelope, or pronghorn. 1.美洲羚羊,或称叉角羚,是该大陆典型的草原动物。 2. Of the millions wh...

考研英语阅读真题长难句分析经典100句下载点击免费下载:考研英语阅读真题长难句分析经典100句.doc 考研英语阅读真题长难句分析经典100句,下面提供5个句子的中英文翻译作样本,如果大家觉得对考研复习有帮助的话,就可以点...

推荐阅读
图文推荐