2007--2011国家计算机二级c语言历年真题及答案

更新时间:2024-06-14 19:41:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. To change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and 2011年3月计算机等级考试二级C语言笔试

一、 选择题

(1)下列关于栈叙述正确的是 A)栈顶元素最先能被删除 B)栈顶元素最后才能被删除 C)栈底元素永远不能被删除 D)以上三种说法都不对 (2)下列叙述中正确的是

A)有一个以上根结点的数据结构不一定是非线性结构 B)只有一个根结点的数据结构不一定是线性结构 C)循环链表是非线性结构 D)双向链表是非线性结构

(3)某二叉树共有7个结点,其中叶子结点只有1个,则该二叉树的深度为(假设根结点在第1层)

A)3 B)4 C)6 D)7 (4)在软件开发中,需求分析阶段产生的主要文档是 A)软件集成测试计划 B)软件详细设计说明书 C)用户手册 D)软件需求规格说明书

(5)结构化程序所要求的基本结构不包括 A)顺序结构 B)GOTO跳转

C)选择(分支)结构 D)重复(循环)结构 (6)下面描述中错误的是

A)系统总体结构图支持软件系统的详细设计

B)软件设计是将软件需求转换为软件表示的过程 C)数据结构与数据库设计是软件设计的任务之一 D)PAD图是软件详细设计的表示工具

(7)负责数据库中查询操作的数据库语言是 A)数据定义语言 B)数据管理语言 C)数据操纵语言 D)数据控制语言

(8)一个教师可讲授多门课程,一门课程可由多个教师讲授。则实体教师和课程间的联系是

A)1:1联系 B)1:m联系 C)m:1联系 D)m:n联系 (9)有三个关系R、S和T如下:

则由关系R和S得到关系T的操作是 A)自然连接 B)交 C)除 D)并

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History haconferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. To change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and (10)定义无符号整数类为UInt,下面可以作为类UInt实例化值的是 A)-369 B)369 C)0.369 D)整数集合{1,2,3,4,5}

(11)计算机高级语言程序的运行方法有编译执行和解释执行两种,以下叙述中正确的是

A)C语言程序仅可以编译执行 B)C语言程序仅可以解释执行

C)C语言程序既可以编译执行又可以解释执行 D)以上说法都不对

(12)以下叙述中错误的是

A)C语言的可执行程序是由一系列机器指令构成的 B)用C语言编写的源程序不能直接在计算机上运行 C)通过编译得到的二进制目标程序需要连接才可以运行

D)在没有安装C语言集成开发环境的机器上不能运行C源程序生成的.exe文件

(13)以下选项中不能用作C程序合法常量的是 A)1,234 B)'123' C)123 D)\

(14)以下选项中可用作C程序合法实数的是 A).1e0 B)3.0e0.2 C)E9 D)9.12E

(15)若有定义语句:int a=3,b=2,c=1;,以下选项中错误的赋值表达式是 A)a=(b=4)=3; B)a=b=c+1;

C)a=(b=4)+c; D)a=1+(b=c=4); (16)有以下程序段 char name[20]; int num;

scanf(\

当执行上述程序段,并从键盘输入:name=Lili num=1001<回车>后,name的值为

A)Lili B)name=Lili

C)Lili num= D)name=Lili num=1001

(17)if语句的基本形式是:if(表达式)语句,以下关于“表达式”值的叙述中正确的是

A)必须是逻辑值 B)必须是整数值

C)必须是正数 D)可以是任意合法的数值 (18)有以下程序 #include main()

{ int x=011;

printf(\ }

程序运行后的输出结果是 A)12 B)11 C)10 D)9 (19)有以下程序

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. o change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and

#include main() { int s;

scanf(\while(s>0) { switch(s)

{ case1:printf(\

case2:printf(\case3:printf(\

default:printf(\}

scanf(\} }

运行时,若输入1 2 3 4 5 0<回车>,则输出结果是 A) B)66656 C)66666 D) (20)有以下程序段 int i,n;

for(i=0;i<8;i++) { n=rand()%5; switch (n) { case 1:

case 3:printf(\ case 2:

case 4:printf(\ case 0:exit(0); }

printf(\ }

以下关于程序段执行情况的叙述,正确的是 A)for循环语句固定执行8次

B)当产生的随机数n为4时结束循环操作

C)当产生的随机数n为1和2时不做任何操作 D)当产生的随机数n为0时结束程序运行 (21)有以下程序 #include main()

{ char s[]=\ int i,n=0;

for(i=0;s[i]!=0;i++)

if(s[i]>='0'&&s[i]<='9') n++; printf(\ }

程序运行后的输出结果是 A)0 B)3 C)7 D)8

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. To change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and (22)若i和k都是int类型变量,有以下for语句 for(i=0,k=-1;k=1;k++) printf(\ 下面关于语句执行情况的叙述中正确的是 A)循环体执行两次 B)循环体执行一次

C)循环体一次也不执行 D)构成无限循环 (23)有以下程序 #include main()

{ char b,c; int i; b='a'; c='A'; for(i=0;i<6;i++)

{ if(i%2) putchar(i+b); else putchar(i+c); } printf(\ }

程序运行后的输出结果是

A)ABCDEF B)AbCdEf C)aBcDeF D)abcdef

(24)设有定义:double x[10],*p=x;,以下能给数组x下标为6的元素读入数据的正确语句是

A)scanf(\ C)scanf(\

(25)有以下程序(说明:字母A的ASCII码值是65) #include

void fun(char *s) { while(*s)

{ if(*s%2) printf(\ s++; } }

main()

{ char a[]=\fun(a); printf(\ }

程序运行后的输出结果是 A)BY B)BT C)YT D) YE (26)有以下程序段 #include main() {

while( getchar()!='\\n'); }

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. o change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and 以下叙述中正确的是

A)此while语句将无限循环

B) getchar()不可以出现在while语句的条件表达式中 C)当执行此while语句时,只有按回车键程序才能继续执行 D)当执行此while语句时,按任意键程序就能继续执行 (27)有以下程序 #include main()

{ int x=1,y=0; if(!x) y++; else if(x==0) if (x) y+=2; else y+=3;

printf(\ }

程序运行后的输出结果是 A)3 B)2 C)1 D) 0

(28)若有定义语句:char s[3][10],(*k)[3],*p;,则以下赋值语句正确的是 A)p=s; B)p=k; C)p=s[0]; D)k=s; (29)有以下程序 #include

void fun(char *c) { while(*c)

{ if(*c>='a'&&*c<='z') *c=*c-('a'-'A'); c++; } }

main()

{ char s[81];

gets(s); fun(s); puts(s): }

当执行程序时从键盘上输入Hello Beijing<回车>,则程序的输出结果是 A)hello beijing B)Hello Beijing C)HELLO BEIJING D)hELLO Beijing (30)以下函数的功能是:通过键盘输入数据,为数组中的所有元素赋值。 #include #define N 10

void fun(int x[N]) { int i=0; while(i }

在程序中下划线处应填入的是 A)x+i B)&x[i+1]

C)x+(i++) D)&x[++i]

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has

conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. To change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and (31)有以下程序 #include main()

{ char a[30],b[30]; scanf(\ gets(b);

printf(\ }

程序运行时若输入:

how are you? I am fine<回车> 则输出结果是

A)how are you? B)how

I am fine are you? I am fine

C)how are you? I am fine D)row are you? (32)设有如下函数定义 int fun(int k)

{ if (k<1) return 0;

else if(k==1) return 1; else return fun(k-1)+1; }

若执行调用语句:n=fun(3);,则函数fun总共被调用的次数是 A)2 B)3 C)4 D)5 (33)有以下程序 #include

int fun (int x,int y)

{ if (x!=y) return ((x+y);2); else return (x); }

main()

{ int a=4,b=5,c=6;

printf(\ }

程序运行后的输出结果是 A)3 B)6 C)8 D)12 (34)有以下程序 #include int fun()

{ static int x=1; x*=2;

return x; }

main()

{ int i,s=1;

for(i=1;i<=3;i++) s*=fun();

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. o change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and printf(\ }

程序运行后的输出结果是 A)0 B)10 C)30 D)64 (35)有以下程序 #include

#define S(x) 4*(x)*x+1 main()

{ int k=5,j=2;

printf(\ }

程序运行后的输出结果是 A)197 B)143 C)33 D)28

(36)设有定义:struct {char mark[12];int num1;double num2;} t1,t2;,若变量均已正确赋初值,则以下语句中错误的是 A)t1=t2; B)t2.num1=t1.num1;

C)t2.mark=t1.mark; D)t2.num2=t1.num2; (37)有以下程序 #include struct ord

{ int x,y;}dt[2]={1,2,3,4}; main() {

struct ord *p=dt;

printf(\ }

程序运行后的输出结果是 A)1,2 B)4,1 C)3,4 D)2,3 (38)有以下程序 #include struct S

{ int a,b;}data[2]={10,100,20,200}; main()

{ struct S p=data[1];

printf(\ }

程序运行后的输出结果是 A)10 B)11 C)20 D)21 (39)有以下程序 #include main()

{ unsigned char a=8,c; c=a>>3;

printf(\

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. To change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and 程序运行后的输出结果是 A)32 B)16 C)1 D)0

(40)设fp已定义,执行语句fp=fopen(\后,以下针对文本文件file操作叙述的选项中正确的是

A)写操作结束后可以从头开始读 B)只能写不能读 C)可以在原有内容后追加写 D)可以随意读和写 二、填空题

(1)有序线性表能进行二分查找的前提是该线性表必须是 【1】 存储的。 (2)一棵二叉树的中序遍历结果为DBEAFC,前序遍历结果为ABDECF,则后序遍历结果为 【2】 。

(3)对软件设计的最小单位(模块或程序单元)进行的测试通常称为 【3】 测试。

(4)实体完整性约束要求关系数据库中元组的 【4】 属性值不能为空。 (5)在关系A(S,SN,D)和关系B(D,CN,NM)中,A的主关键字是S,B的主关键字是D,则称 【5】 是关系A的外码。

(6)以下程序运行后的输出结果是 【6】 。 #include main() { int a;

a=(int)((double)(3/2)+0.5+(int)1.99*2); printf(\ }

(7)有以下程序 #include main() { int x;

scanf(\

if(x>15) printf(\ if(x>10) printf(\ if(x>5) printf(\ }

若程序运行时从键盘输入12<回车>,则输出结果为 【7】 。 (8)有以下程序(说明:字符0的ASCII码值为48) #include main()

{ char c1,c2; scanf(\ c2=c1+9;

printf(\ }

若程序运行时从键盘输入48<回车>,则输出结果为 【8】 。 (9)有以下函数

void prt(char ch,int n) { int i;

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. o change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and for(i=1;i<=n;i++)

printf(i%6!=0?\ }

执行调用语句prt('*',24);后,函数共输出了 【9】 行*号。 (10)以下程序运行后的输出结果是 【10】 。 #include main()

{ int x=10,y=20,t=0; if(x==y)t=x;x=y;y=t; printf(\ }

(11)己知a所指的数组中有N个元素。函数fun的功能是,将下标k(k>0)开始的后续元素全部向前移动一个位置。请填空。 void fun(int a[N],int k) { int i; for(i=k;i }

(12)有以下程序,请在 【12】 处填写正确语句,使程序可正常编译运行。 #include 【12】 ; main()

{ double x,y,(*p)(); scanf(\ p=avg;

printf(\ }

double avg(doublea,double b) { return((a+b)/2);}

(13)以下程序运行后的输出结果是 【13】 。 #include main()

{ int i,n[5]={0}; for(i=1;i<=4;i++)

{ n[i]==n[i-1]*2+1; printf(\ printf(\ }

(14)以下程序运行后的输出结果是 【14】 。 #include main()

{ char *p; int i;

p=(char *)malloc(sizeof(char)*20); strcpy(p,\

for(i=6;i>=0;i--) putchar(*(p+i)); printf(\

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. To change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and (15)以下程序运行后的输出结果是 【15】 。 #include main()

{ FILE *fp; int x[6]={1,2,3,4,5,6},i; fp=fopen(\ fwrite(x,sizeof(int),3,fp); rewind(fp);

fread(x,sizeof(int),3,fp);

for(i=0;i<6;i++) printf(\ printf(\ fclose(fp);

2009年9月全国计算机等级考试二级笔试试卷

C语言程序设计

(考试时间90分钟,满分100分)

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has

conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. o change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and 一、选择题((1)—(10)、(21)—(40)每题2分,(11)—(20)每题1分,共70分)

(1)下列数据结构中,属于非线性结构的是 A)循环队列 B) 带链队列 C) 二叉树 D)带链栈

(2)下列数据结果中,能够按照“先进后出”原则存取数据的是 A) 循环队列 B) 栈 C)队列

D)二叉树

(3)对于循环队列,下列叙述中正确的是 A)队头指针是固定不变的

B)队头指针一定大于队尾指针 C)队头指针一定小于队尾指针

D)队头指针可以大于队尾指针,也可以小于队尾指针 (4)算法的空间复杂度是指

A)算法在执行过程中所需要的计算机存储空间 B)算法所处理的数据量

C)算法程序中的语句或指令条数

D)算法在执行过程中所需要的临时工作单元数 (5)软件设计中划分模块的一个准则是 A) 低内聚低耦合 B) 高内聚低耦合 C) 低内聚高耦合 D) 高内聚高耦合

(6)下列选项中不属于结构化程序设计原则的是 A) 可封装 D) 自顶向下

C) 模块化 D) 逐步求精

(7)软件详细设计产生的图如下:

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. To change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and

该图是 A) N-S图 B) PAD图

C) 程序流程图

D) E-R图

(8)数据库管理系统是 A)操作系统的一部分

B) 在操作系统支持下的系统软件 C) 一种编译系统 D) 一种操作系统

(9)在E-R图中,用来表示实体联系的图形是 A) 椭圆图 B) 矩形 C) 菱形

D) 三角形

(10)有三个关系R,S和T如下:

其中关系T由关系R和S通过某种操作得到,该操作为 A) 选择 B) 投影 C) 交 D) 并

(11)以下叙述中正确的是

A)程序设计的任务就是编写程序代码并上机调试 B)程序设计的任务就是确定所用数据结构 C)程序设计的任务就是确定所用算法

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. o change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and D)以上三种说法都不完整

(12)以下选项中,能用作用户标识符的是 A)void B)8_8 C)_0_

D)unsigned

(13)阅读以下程序 #include main()

{ int case; float printF;

printf(“请输入2个数:”);

scanf(“%d %f”,&case,&pjrintF); printf(“%d %f\\n”,case,printF); }

该程序编译时产生错误,其出错原因是

A)定义语句出错,case是关键字,不能用作用户自定义标识符 B)定义语句出错,printF不能用作用户自定义标识符 C)定义语句无错,scanf不能作为输入函数使用 D)定义语句无错,printf不能输出case的值 (14)表达式:(int)((double)9/2)-(9)%2的值是 A)0 B)3 C)4 D)5

(15)若有定义语句:int x=10;,则表达式x-=x+x的值为 A)-20 B)-10 C)0 D)10

(16)有以下程序

#include main()

{ int a=1,b=0;

printf(“%d,”,b=a+b); printf(“%d\\n”,a=2*b); }

程序运行后的输出结果是 A)0,0

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. To change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and B)1,0

C)3,2 D)1,2

17)设有定义:int a=1,b=2,c=3;,以下语句中执行效果与其它三个不同的是

A)if(a>b) c=a,a=b,b=c; B)if(a>b) {c=a,a=b,b=c;} C)if(a>b) c=a;a=b;b=c; D)if(a>b) {c=a;a=b;b=c;} (18)有以下程序 #include

main()

{ int c=0,k;

for (k=1;k<3;k++) switch (k)

{ default: c+=k case 2: c++;break; case 4: c+=2;break; }

printf(“%d\\n”,c);

}

程序运行后的输出结果是 A)3 B)5 C)7 D)9

(19)以下程序段中,与语句:k=a>b?(b>c?1:0):0;功能相同的是 A)if((a>b)&&(b>c)) k=1; else k=0;

B)if((a>b)||(b>c) k=1; else k=0;

C)if(a<=b) k=0; else if(b<=c) k=1; D)if(a>b) k=1; else if(b>c) k=1; else k=0; 20)有以下程序 #include

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. o change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and main()

{ char s[]={“012xy”};int i,n=0; for(i=0;s[i]!=0;i++)

if(s[i]>=’a’&&s[i]<=’z’) n++; printf(“%d\\n”,n); }

程序运行后的输出结果是 A)0 B)2 C)3 D)5

(21)有以下程序 #include main()

{ int n=2,k=0;

while(k++&&n++>2);

printf(“%d %d\\n”,k,n); }

程序运行后的输出结果是 A)0 2

B)1 3 C)5 7 D)1 2

(22)有以下定义语句,编译时会出现编译错误的是 A)char a=’a’; B)char a=’\\n’; C)char a=’aa’; D)char a=’\\x2d’; (23)有以下程序 #include

main()

{ char c1,c2;

c1=’A’+’8’-‘4’; c2=’A’+’8’-‘5’;

printf(“%c,%d\\n”,c1,c2); }

已知字母A的ASCII码为65,程序运行后的输出结果是 A)E,68

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has

conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. To change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and B)D,69

C)E,D

D)输出无定值 (24)有以下程序 #include

void fun(int p) { int d=2;

p=d++; printf(“%d”,p);} main()

{ int a=1;

fun(a); printf(“%d\\n”,a);}

程序运行后的输出结果是 A)32 B)12 C)21 D)22

(25)以下函数findmax拟实现在数组中查找最大值并作为函数值返回,但程序中有错导致不能实现预定功能

#define MIN -

int findmax (int x[],int n)

{ int i,max;

for(i=0;i

return max; }

造成错误的原因是

A)定义语句int i,max;中max未赋初值

B)赋值语句max=MIN;中,不应给max赋MIN值 C)语句if(max

D)赋值语句max=MIN;放错了位置 (26)有以下程序 #include main()

{ int m=1,n=2,*p=&m,*q=&n,*r; r=p;p=q;q=r;

printf(“%d,%d,%d,%d\\n”,m,n,*p,*q); }

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. o change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and 程序运行后的输出结果是

A)1,2,1,2 B)1,2,2,1 C)2,1,2,1 D)2,1,1,2

(27)若有定义语句:int a[4][10],*p,*q[4];且0≤i<4,则错误的赋值是

A)p=a

B)q[i]=a[i] C)p=a[i]

D)p=&a[2][1]

(28)有以下程序 #include #include main()

{ char str[ ][20]={“One*World”, “One*Dream!”},*p=str[1]; printf(“%d,”,strlen(p));printf(“%s\\n”,p); }

程序运行后的输出结果是 A)9,One*World

B)9,One*Dream C)10,One*Dream D)10,One*World (29)有以下程序 #include main()

{ int a[ ]={2,3,5,4},i; for(i=0;i<4;i++) switch(i%2)

{ case 0:switch(a[i]%2)

{case 0:a[i]++;break; case 1:a[i]--; }break;

case 1:a[i[=0; }

for(i=0;i<4;i++) printf(“%d”,a[i]); printf(“\\n”); }

A)3 3 4 4

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. To change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and B)2 0 5 0

C)3 0 4 0 D)0 3 0 4

(30)有以下程序 #include #include main()

{ char a[10]=”abcd”;

printf(“%d,%d\\n”,strlen(a),sizeof(a)); }

程序运行后的输出结果是

A)7,4 B)4,10 C)8,8 D)10,10

(31)下面是有关C语言字符数组的描述,其中错误的是 A)不可以用赋值语句给字符数组名赋字符串

B)可以用输入语句把字符串整体输入给字符数组 C)字符数组中的内容不一定是字符串 D)字符数组只能存放字符串

(32)下列函数的功能是 fun(char * a,char * b)

{ while((*b=*a)!=’\\0’) {a++,b++;} } A)将a所指字符串赋给b所指空间 B)使指针b指向a所指字符串

C)将a所指字符串和b所指字符串进行比较 D)检查a和b所指字符串中是否有’\\0’ (33)设有以下函数

void fun(int n,char * s) {……}

则下面对函数指针的定义和赋值均是正确的是 A)void (*pf)(); pf=fun; B)viod *pf(); pf=fun; C)void *pf(); *pf=fun;

D)void (*pf)(int,char);pf=&fun; (34)有以下程序 #include

int f(int n); main()

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. o change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and { int a=3,s;

s=f(a);s=s+f(a);printf(“%d\\n”,s); }

int f(int n)

{ static int a=1; n+=a++; return n; }

程序运行以后的输出结果是 A)7 B)8

C)9 D)10

(35)有以下程序 #include

#define f(x) x*x*x main()

{ int a=3,s,t;

s=f(a+1);t=f((a+1));

printf(“%d,%d\\n’,s,t);

}

程序运行后的输出结果是 A)10,64 B)10,10 C)64,10 D)64,64

(36)下面结构体的定义语句中,错误的是

A)struct ord {int x;int y;int z;}; struct ord a; B)struct ord {int x;int y;int z;} struct ord a; C)struct ord {int x;int y;int z;} a;

D)struct {int x;int y;int z;} a; (37)设有定义:char *c;,以下选项中能够使字符型指针c正确指向一个字符串的是

A)char str[ ]=”string”;c=str; B)scanf(“%s”,c); C)c=getchar(); D)*c=”string”; (38)有以下程序

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. To change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and #include

#include struct A

{ int a; char b[10]; double c;}; struct A f(struct A t); main()

{ struct A a={1001,”ZhangDa”,1098.0};

a=f(a);jprintf(“%d,%s,%6.1f\\n”,a.a,a.b,a.c); }

struct A f(struct A t)

( t.a=1002;strcpy(t.b,”ChangRong”);t.c=1202.0;return t; ) 程序运行后的输出结果是 A)1001,ZhangDa,1098.0 B)1001,ZhangDa,1202.0 C)1001,ChangRong,1098.0 D)1001,ChangRong,1202.0 (39)若有以下程序段 int r=8;

printf(“%d\\n”,r>>1); 输出结果是

A)16 B)8 C)4 D)2

(40)下列关于C语言文件的叙述中正确的是

A)文件由一系列数据依次排列组成,只能构成二进制文件 B)文件由结构序列组成,可以构成二进制文件或文本文件 C)文件由数据序列组成,可以构成二进制文件或文本文件 D)文件由字符序列组成,其类型只能是文本文件 二、填空题(每空2分,共30分)

(1)某二叉树有5个度为2的结点以及3个度为1的结点,则该二叉树中共有 【1】 个结点。

(2)程序流程图中的菱形框表示的是 【2】 。 (3)软件开发过程主要分为需求分析、设计、编码与测试四个阶段,其中 【3】 阶段产生“软件需求规格说明书。

(4)在数据库技术中,实体集之间的联系可以是一对一或一对多或多对多的,那么“学生”和“可选课程”的联系为 【4】 。

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has

conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. o change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and (5)人员基本信息一般包括:身份证号,姓名,性别,年龄等。其中可以作为主关键字的是 【5】 。

(6)若有定义语句:int a=5;,则表达式:a++的值是 【6】 。

(7)若有语句double x=17;int y;,当执行y=(int)(x/5)%2;之后y的值为 【7】 。

(8)以下程序运行后的输出结果是 【8】 。 #include main()

{ int x=20;

printf(“%d”,0

(9)以下程序运行后的输出结果是 【9】#include main()

{ int a=1,b=7; do {

b=b/2;a+=b; } while (b>1);

printf(“%d\\n”,a);} (10)有以下程序

#include main()

{ int f,f1,f2,i; f1=0;f2=1;

printf(“%d %d”,f1,f2); for(i=3;i<=5;i++)

{ f=f1+f2; printf(“%d”,f); f1=f2; f2=f; }

printf(“\\n”);

}

程序运行后的输出结果是 【10】 。 (11)有以下程序 #include int a=5;

void fun(int b) { int a=10;

a+=b;printf(“%d”,a);

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's aservice innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents inational prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education a dvanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented e complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the ng point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has 。n 2010 on the basis of doublctivities in depth the fundamental starticonferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. To change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and }

main()

{ int c=20;

fun(c);a+=c;printf(“%d\\n”,a); }

程序运行后的输出结果是 【11】 。 (12)设有定义: struct person

{ int ID;char name[12];}p;

请将scanf(“%d”, 【12】 );语句补充完整,使其能够为结构体变量p的成员ID正确读入数据。

(13)有以下程序 #include main()

{ char a[20]=”How are you?”,b[20];

scanf(“%s”,b);printf(“%s %s\\n”,a,b); }

程序运行时从键盘输入:How are you?<回车> 则输出结果为 【13】 。

(14)有以下程序 #include

typedef struct

{ int num;double s}REC;

void fun1( REC x ){x.num=23;x.s=88.5;} main()

{ REC a={16,90.0 }; fun1(a);

printf(“%d\\n”,a.num); }

程序运行后的输出结果是 【14】 。

(15)有以下程序 #include fun(int x)

{ if(x/2>0) run(x/2); printf(“%d ”,x); }

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. o change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and main() { fun(6);printf(“\\n”); } 程序运行后的输出结果是 【15】 。 2009年9月全国计算机等级考试二级C语言笔试参考答案 一、 选择题 (1) (6) (11) (16) (21) (26) (31) (36) D D D B D B C A (2) (7) (12) (17) (22) (27) (32) (37) C C C A A A B C (3) (8) (13) (18) (23) (28) (33) (38) A A A C A D D B (4) (9) (14) (19) (24) (29) (34) (39) B A C C C C A C (5) (10) (15) (20) (25) (30) (35) (40) B B D B A C B D * 答案仅供参考 (10)0 1 123 (9)5 (8)1 0 (7)1 (6)5 (5)身份证号 (4)多对多 (3)需求分析 (2)逻辑条件 (1)14 ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. To change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and 二、填空题

2009年3月二级C语言笔试真题及答案

((1)—(10)每小题2分,(11)—(50)每题1分,共60分) 下列各题A)、B)、C)、D)四个选项中,只有一个选项是正确的,请将正确选项涂写在答题卡相应位置上,答在试卷上不得分。 (1)下列叙述中正确的是

A)栈是“先进先出”的线性表 B)队列是“先进先出”的线性表 C)循环队列是非线性结构

D)有序性表既可以采用顺序存储结构,也可以采用链式存储结构 (2)支持子程序调用的数据结构是 A)栈 B)树 C)队列 D)二叉树

(3)某二叉树有5个度为2的结点,则该二叉树中的叶子结点数是 A)10 B)8 C)6 D)4

(4)下列排序方法中,最坏情况下比较次数最少的是 A)冒泡排序

B)简单选择排序 C)直接插入排序 D)堆排序

(5)软件按功能可以分为:应用软件、系统软件和支撑软件(或工具软件)。下面属于应用软件的是 A)编译软件 B)操作系统

C)教务管理系统 D)汇编程序

(6)下面叙述中错误的是

A)软件测试的目的是发现错误并改正错误

B)对被调试的程序进行“错误定位”是程序调试的必要步骤 C)程序调试通常也称为Debug

D)软件测试应严格执行测试计划,排除测试的随意性

(7)耦合性和内聚性是对模块独立性度量的两个标准。下列叙述中正确的是 A)提高耦合性降低内聚性有利于提高模块的独立性 B)降低耦合性提高内聚性有利于提高模块的独立性

C)耦合性是指一个模块内部各个元素间彼此结合的紧密程度 D)内聚性是指模块间互相连接的紧密程度

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. o change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and (8)数据库应用系统中的核心问题是 A)数据库设计 B)数据库系统设计 C)数据库维护 D)数据库管理员培训 (9)有两个关系R,S如下: R A B C a 3 2 b 0 1 c 2 1 S A B a 3 b 0 c 2 由关系R通过运算得到关系S,则所使用的运算为 A)选择 B)投影 C)插入 D)连接 (10)将E-R图转换为关系模式时,实体和联系都可以表示为 A)属性 B)键 C)关系 D)域 (11)以下选项中合法的标识符是 A) 1-1 B)1—1 C)-11 D)1-- (12)若函数中有定义语句:int k;,则 A)系统将自动给k赋初值0 B)这时k中值无定义 C)系统将自动给k赋初值-1 D)这时k中无任何值 (13)以下选项中,能用作数据常量的是 A)o115 B) 0118 C)1.5e1.5 D) 115L (14)设有定义:int x=2;,以下表达式中,值不为6的是 A) x*=x+1 B) x++,2*x C)x*=(1+x) D)2*x,x+=2 (15)程序段:int x=12; double y=3.; printf(“%d%8.6f”,x,y);的输出结果是 A)123. B)12 3. ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has

conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. To change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and C)12,3. D)123.

(16)若有定义语句:double x,y,*px,*py,执行了px=&x, py=&y;之后,正确的输入语句是

A)scanf(“%f%f”,x,y); B) scanf(“%f%f”,&x,&y); C) scanf(“%lf%le”,px,py); D) scanf(“%lf%lf”,x,y); (17)以下是if语句的基本形式: if(表达式) 语句

其中“表达式”

A)必须是逻辑表达式 B)必须是关系表达式

C)必须是逻辑表达式或关系表达式 D)可以是任意合法的表达式 (18)有以下程序 #include main() {int x;

scanf(“%d”,&x); if(x<=3); else if(x!=10)

printf(“%d\\n”,x); }

程序运行时,输入的值在哪个范围才会有输出结果 A)不等于10的整数

B)大于3且不等于10的整数 C)

大于3或等于10的整数 D)小于3的整数 (19)有以下程序 #include Main() {

int a=1,b=2,c=3,d=0; if(a= =1 &&b++= =2) if(b!=2 || c--!=3)

printf(“%d,%d,%d\\n”,a,b,c);

else printf(“%d,%d,%d\\n”,a,b,c); else printf(“%d,%d,%d\\n”,a,b,c); }

程序运行后的输出结果是

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. o change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and A)1,2,3 B)1,3,2 C)1,3,3 D)3,2,1

(20)以下程序中的变量已正确定义 for(i=0;i<4;i++,i++

for(k=1;k<3;k++);printf(*”); 程序段的输出结果是 A)******** B)**** C)** D)*

(21)有以下程序 #include main() {char

*s=(“ABC); do

{printf(“%d”,*s);s++; }while(*s); }

注意,字母A的ASCII码值为65。程序运行后的输出结果是 A)5670 B) C)567 D)ABC

(22)设变量已正确定义,以下不能统计出一行中输入字符个数(不包含回车符)的程序段是

A)n=0;while((ch=getchar())!=’\\n’)n++; B) n=0;while(getchar()!=’\\n’)n++; C)for(n=0; getchar()!=’\\n’;n++);

D)n=0;for(ch=getchar();ch!=’\\n’;n++); (23)有以下程序 #include main()

{ int a1,a2;char c1,c2;

scanf(“%d%c%d%c”,&a1,&c1,&a2,&c2); printf(“%d,%c,%d,%c”,&1,c1,a2,c2); }

若想通过键盘输入,使得a1的值为12,a2的是为34,c1的值为字符a,c2的值为字符b,程序输出结果是:12,a,34,b,则正确的输入格式是(以下 代表空格,代表回车) A)12a34b B)12

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. To change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and a 34 b

C)12,a,34,b D)12 a34 b

(24)有以下程序 #include int f(int x,int y) {return()y-x)*x);} main()

{int a=3,b=4,c=5,d;

d=f(f(a,b),f(a,c)); printf(“%d\\n”,d); }

程序运行后的输出结果是 A)10 B)9 C)8 D)7

(25)有以下程序 #include void fun(char *s)

{while(*s)

{ if(*s%2==0)

printf(“%c”,*s); s++; } }

main() { char

a[]={“good”};

fun(a);printf(“\\n”); }

注意:字母a的ASCⅡ码值为97,程序运行后的输出结果是 A)d B)go C)god D)good

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. o change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and (26)有以下程序 #include

void fun( int *a,int *b) {int *c;

c=a;a=b;b=c; }

main()

{int x=3,y-5,*P=&x,*q=&y;

fun(p,q);printf(“%d,%d,”,*p,*q); fun(&x,&y);printf(“%d,%d\\n”,*p,*q); }

程序运行后的输出结果是 A)3,5,5,3 B)3,5,3,5 C)5,3,3,5 D)5,3,5,3

(27)有以下程序 #include

viod f(int *p,int *q); main()

{ int m=1,n=2,*r=&m;

f(r,&n);printf(“%d,%d”,m,n); }

void f(int *p,int *q) {p=p+1;*q=*q+1;}

程序运行后输出的结果是 A)1,3 B)2,3 C)1,4 D)1,2

(28)以下函数按每行8个输出数组中的数据 void fun( int *w,int n) { int i;

for(i=0;i

{_________________

printf(“%d”,w); }

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. To change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and printf(“\\n”); }

下划线处应填入的语句是

A)if(i/8==0)print(“\\n”); B) if(i/8==0)continue;

C) if(i%8==0)print(“\\n”); D) if(i%8==0)continue; (29)若有以下定义

int x[10],*pt=x;

则对x数组元素的正确应用是 A)*&x[10] B)*(x+3) C)*(pt+10) D)pt+3

(30)设有定义:char s[81];int i=10;,以下不能将一行(不超过80个字符)带有空格的字符串真确读入的语句或语句组是 A

gets(s)

B)while((s[i++]=getchar())!=”\\n”;s=”\\0”; C)scanf(“%s”,s);

D)do{scanf(“%c”,&s);}while(s[i++]!=”\\n”);s=”\\0”; (31)有以下程序 #include main()

{ char *a[ ]={“abcd”,”ef”,”gh”,”ijk”};int I;

for(i=0;i<4;i++) printf(“%c”,*a); }

程序运行后输出的结果是 A)aegi B)dfhk C)abcd

D)abcdefghijk

(32)以下选项中正确的语句组是 A)char s[];s=”BOOK!”; B) char *s;s={”BOOK!”}; C)char s[10];s=”BOOK!”; D) char *s;s=”BOOK!”; (33)有以下程序 #include int fun{int x,int y}

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has

conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. o change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and { if(x==y) return(x);

else returen((x+y)/2) }

main()

{ int a=4,b=5,c=6;

printf(“%d\\n”,fun(2*a,fun(b,c))) }

程序运行后的输出结果是 A)3 B)6 C)8 D)12

(34)设函数中有整型变量n,为保证其在未赋值的情况下初值为0,应选择的存储类别是 A)auto

B) register C)static

D)auto或register (35)有以下程序 #include int b=2;

int fun(int *k)

{ b=*k+b;return(b);} main()

{ int a[10]={1,2,3,4,5,6,7,8},I;

for(i=2;i<4;i++) {b=fun(&a)+b;printf(“%d”,b);}

printf(“\\n”); }

程序运行后输出的结果是 A)10 12

B)8 10 C)10 28 D)10 16

(36)有以下程序 #include

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. To change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and #define PT 3.5;

#define S(x) PT*x*x; mian()

{ int a=1, b=2; printf(“%4.1f\\n”,S(a+b));} 程序运行后输出的结果是 A)14.0 B)31.5 C)7.5

D)程序有错无输出结果 (37)有以下程序 #include struct ord

{ int x,y;} dt[2]={1,2,3,4}; main()

{ struct ord *p=dt;

printf(“%d,”,++p->x); printf(“%d\\n”,++p->y); }

程序的运行结果是 A)1,2 B)2,3 C)3,4 D)4,1

(38)设有宏定义:#include

IsDIV(k,n) ((k%n==1)?1:0且变量m已正确定义并赋值,则宏调用:IsDIV(m,5)&& IsDIV(m,7)为真时所要表达的是 A)判断m是否能被5或者7整除 B)判断m是否能被5和7整除 C)判断m被5或者7整除是否余1 D)判断m被5和7整除是否余1 (39)有以下程序 #include main()

{ int a=5,b=1,t;

t=(a<<2|b); printf(“%d\\n”,t) }

程序运行后的输出结果是 A)21 B)11 C)6 D)1

(40)有以下程序

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. o change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and #include main() { EILE *f;

f=fopen(“filea.txt”,”w”);

fprintf(f,”abc”);

fclose(f); }

若文本文件filea.txt中原有内容为:hello,则运行以上程序后,文件filea.txt中的内容为 A) helloabc B)abclo C)abc

D)abchello

二、填空题(每空2分,共30分)

请将每一个空的正确答案写在答题卡【1】至【15】序号的横线上,答在试卷上不得分。

(1)假设一个长度为50的数组(数组元素的下标从0到49)作为栈的存储空间,栈底指针bottom指向栈底元素,栈顶指针top指向栈顶元素,如果bottom=49,top=30(数组下标),则栈中具有【1】个元素。

(2)软件测试可分为白盒测试和黑盒测试。基本路径测试属于 【2】测试。 (3)符合结构化原则的三种基本控制结构是:选择结构、循环结构和 【3】。

(4)数据库系统的核心是 【4】

(5)在E-R图中,图形包括矩形框、菱形框、椭圆框。其中表示实体联系的是 【5】框。

(6)表达式(int)((double)(5/2)+2.5)的值是【6】

(7)若变量x、y已定义为int类型且x的值为99,y的值为9,请将输出语句printf(【7】,x/y);补充完整,使其输出的计算结果形式为:x/y=11 (8)有以下程序

#include main( ) {

char c1,c2;

scanf(“&c”,&c1);

while(c1<65||c1>90) scanf(“&c”,&c1);

c2=c1+32;

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. To change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and

printf(“&c, &c\\n”,c1,c2); }

程序运行输入65回车后,能否输出结果、结束运行(请回答能或不能)【8】 。

(9)以下程序运行后的输出结果是【9】 #include main( )

{int k=1,s=0; do{

if{((k&2)!=0)continue; s+=k;k++;

}while(k)10);

printf(“s=&d/n”,s); }

(10)下列程序运行时,若输入labced12df<回车>输出结果为【10】

#include main( ) {char a =0,ch;

while((ch=getchar())!=’\\n’)

{if(a&2!=0&&(ch>’a’&&ch<=’z’)) ch=ch-‘a’+’A’; a++;putchar(ch); }

printf(“\\n”); }

(11)有以下程序,程序执行后,输出结果是【11】 #include void fun (int *a) {a[0=a[1];]} main()

{int a[10]={10,9,8,7,6,5,4,3,2,1},i; for(i=2;i>=0;i--) fun{&a};

for(i=0;i<10;i++) printf(“&d”,a); printf(“\\n”); }

(12)请将以下程序中的函数声明语句补充完整 #include int【12】 ;

main( )

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. o change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and {int x,y,(*p)(); p=max;

printf(“&d\\n”,&x,&y); }

Int max(int a,int b) {return (a>b/a:b);}

(13)以下程序用来判断指定文件是否能正常打开,请填空 #include main( ) {FILE *fp;

if (((fp=fopen(“test.txt”,”r”))==【13】)) printf(“未能打开文件!\\n”); else

printf(“文件打开成功!\\n”); (14)下列程序的运行结果为【14】 #include #include struct A

{int a;char b[10];double c;}; void

f (struct A *t); main()

{struct A a=(1001,”ZhangDa”,1098,0);

f(&a);printf(“&d,&s,&6,if\\n”,a.a,a.b,a.c); }

void f(struct A *t)

{strcpy(t->b,”ChangRong”); }

(15)以下程序把三个NODETYPE型的变量链接成一个简单的链表,并在while循环中输出链表结点数据域中的数据,请填空 #include struct node

{int data; struct node *next;}; typedef struct node NODETYPE; main()

{NODETYPE a,b,c,*h,*p; a.

data=10;b.data=20;c.data=30;h=&a; b.

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has

conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. To change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and next=&b;b.next=&c;c.next=’\\0’; p=h;

while(p){printf(“&d”,p->data);【15】;} }

答案: 选择题:

1~10: DACDCABABC 11~20:CBDDACDBCB 21~30:CDABABACBC 31~40:ADBCCCBDAC 填空题:

(1)19(2)白盒(3)顺序结构(4)数据库管理系统(DBMS)(5)菱形 (6)4(7)\(8)能(9)s=0(10)1AbCeDf2dF (11)(12)max(int a,int b)(13)NULL

(14)1001,ChangRong,1098.0(15)p=p—>next

2008年9月二级C语言笔试真题及答案

(考试时间:120分钟,满分100分)

一、选择题((1)~(10)、(21)~(40)每题2 分,(11)~(20)每题1 分,70 分) 下列各题A)、B)、C)、D)四个选项中,只有一个选项是正确的,请将正确选项填涂在

答题卡相应位置上,答在试卷上不得分。

(1)一个栈的初始状态为空。现将元素1、2、3、4、5、A、B、C、D、E 依次入栈,然后

再依次出栈,则元素出栈的顺序是( )。

A)12345ABCDE B)EDCBA54321 C)ABCDE12345 D)54321EDCBA (2)下列叙述中正确的是( )。

A)循环队列有队头和队尾两个指针,因此,循环队列是非线性结构

B)在循环队列中,只需要队头指针就能反映队列中元素的动态变化情况 C)在循环队列中,只需要队尾指针就能反映队列中元素的动态变化情况 D)循环队列中元素的个数是由队头指针和队尾指针共同决定

(3)在长度为n 的有序线性表中进行二分查找,最坏情况下需要比较的次数是( )。

A)O(n) B)O(n2) C)O(log2n) D)O(nlog2n) (4)下列叙述中正确的是( )。

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. o change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and A)顺序存储结构的存储一定是连续的,链式存储结构的存储空间不一定是连续的

B)顺序存储结构只针对线性结构,链式存储结构只针对非线性结构 C)顺序存储结构能存储有序表,链式存储结构不能存储有序表 D)链式存储结构比顺序存储结构节省存储空间 (5)数据流图中带有箭头的线段表示的是( )。 A)控制流 B)事件驱动 C)模块调用 D)数据流

(6)在软件开发中,需求分析阶段可以使用的工具是( )。 A)N-S 图 B)DFD 图 C)PAD 图 D)程序流程图

(7)在面向对象方法中,不属于“对象”基本特点的是( )。 A)一致性 B)分类性 C)多态性 D)标识唯一性

(8)一间宿舍可住多个学生,则实体宿舍和学生之间的联系是( )。 A)一对一 B)一对多 C)多对一 D)多对多

(9)在数据管理技术发展的三个阶段中,数据共享最好的是( )。

A)人工管理阶段 B)文件系统阶段 C)数据库系统阶段 D)三个阶段相同 (10)有三个关系R、S 和T 如下: R S T

A B B C A B C m 1 1 3 m 1 3 n 2 3 5

由关系R 和S 通过运算得到关系T,则所使用的运算为( )。 A)笛卡尔积 B)交 C)并 D)自然连接 (11)以下叙述中正确的是( )。

A)C 程序的基本组成单位是语句 B)C 程序中的每一行只能写一条语句 二级C 语言程序设计试卷 第 2 页(共9 页)

C)简单C 语句必须以分号结束 D)C 语句必须在一行内写完 (12)计算机能直接执行的程序是( )。

A)源程序 B)目标程序 C)汇编程序 D)可执行程序 (13)以下选项中不能作为C 语言合法常量的是( )。 A)'cd' B)0.1e+6 C)\)'\\011' (14)以下选项中正确的定义语句是( )。

A)double a; b; B)double a=b=7; C)double a=7, b=7; D)double, a, b; (15)以下不能正确表示代数式2ab cd

的C 语言表达式是( )。

A)2*a*b/c/d B)a*b/c/d*2 C)a/c/d*b*2 D)2*a*b/c*d (16)C 源程序中不能表示的数制是()。

A)二进制 B)八进制 C)十进制 D)十六进制

(17)若有表达式(w)?(--x):(++y),则其中与w 等价的表达式是( )。 A)w==l B)w==0 C)w!=l D)w!=0

(18)执行以下程序段后,w 的值为( )。 int w='A', x=14, y=15; w=((x || y)&&(w<'a')); A)-1 B)NULL C)l D)0

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. To change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and (19)若变量已正确定义为int 型,要通过语句scanf(\%d, %d\&a, &b, &c);给a 赋值

1、给b 赋值2、给c 赋值3,以下输入形式中错误的是( ò 代表一个空格符)( )。

A)ò ò ò 1,2,3<回车> B)1 ò 2 ò 3<回车> C)1,ò ò ò 2,ò ò ò 3<回车> D)1,2,3<回车> (20)有以下程序段 int a, b, c;

a=10; b=50; c=30;

if (a>b) a=b, b=c; c=a;

printf(\n”, a, b, c); 程序的输出结果是( )。

A)a=10 b=50 c=10 B)a=10 b=50 c=30 C)a=10 b=30 c=10 D)a=50 b=30 c=50 (21)若有定义语句:int m[]={5,4,3,2,1},i=4;,则下面对m 数组元素的引用中错误的是 ( )。

A)m[--i] B)m[2*2] C)m[m[0]] D)m[m[i]]

(22)下面的函数调用语句中func 函数的实参个数是( )。 func (f2(v1, v2), (v3, v4, v5), (v6, max(v7, v8))); A)3 B)4 C)5 D)8

(23)若有定义语句:double x[5]={1.0,2.0,3.0,4.0,5.0}, *p=x;则错误引用x 数组元素的是 ( )。

A)*p B)x[5] C)*(p+1) D)*x

(24)若有定义语句:char s[10]=\,则strlen(s)的值是()。 A)7 B)8 C)9 D)10

(25)以下叙述中错误的是( )。

A)用户定义的函数中可以没有return 语句

B)用户定义的函数中可以有多个return 语句,以便可以调用一次返回多个函数值

C)用户定义的函数中若没有return 语句,则应当定义函数为void 类型 二级C 语言程序设计试卷 第 3 页(共9 页) D)函数的return 语句中可以没有表达式 (26)以下关于宏的叙述中正确的是( )。 A)宏名必须用大写字母表示

B)宏定义必须位于源程序中所有语句之前 C)宏替换没有数据类型限制 D)宏调用比函数调用耗费时间 (27)有以下程序 #include main()

{ int i, j;

for(i=3; i>=l; i--)

{ for(j=1; j<=2; j++) printf(\

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. o change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and printf(\} }

程序的运行结果是( )。 A)2 3 4 B)4 3 2 3 4 5 5 4 3 C)2 3 D)4 5 3 4 3 4 4 5 2 3

(28)有以下程序 #include main()

{ int x=l, y=2, z=3; if(x>y)

if(y

程序的运行结果是( )。 A)331 B)41 C)2 D)1 (29)有以下程序 # include main()

{ int i=5; do

{ if (i%3=1) if (i%5==2)

{ printf(\i++;

} while(i!=0); printf(\}

二级C 语言程序设计试卷 第 4 页(共9 页) 程序的运行结果是( )。

A)*7 B)*3*5 C)*5 D)*2*6 (30)有以下程序 #include int fun(int a,int b) { if(b==0) return a;

else return(fun(--a,--b)); }

main()

{ printf(\程序的运行结果是( )。

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has conferences, learned superiors policies; reports, you can learn to deal with problems, art, just wanted to learn, to learn at any time. To continuously expand the scope of the study. The complexity and comprehensiveness of our work, decided to not only do we want to be \n different areas of knowledge. Mastery of knowledge not only to have knowledge to rational analysis. This on requirements we, not only to learning national of route, and approach, and policy, also to learning national of legal, and regulations; not only to with political theory armed mind, also to with economic theory guide work; not only to read history, also to read history; not only to absorption SM of mirror, also to gets is of road; not only to from local learn, also to to outside learn; not only to to books learn, also to field study learn. Therefore, I would encourage you, and more to the outside world when I have time to take a look at, take a stroll, outside developments, learn other people's development approach, and then come back to guide our work. Second, we must think. \ng without thought to overshadow, thinking without learning is perilous.\he character of advancing with the times, forge ahead, often reflect themselves in adapting to the new situation on whether there are delays, have anything to fear in the reform and innovation, whether in terms of accelerating the development of a relaxation, keep promising State of mind. In order to do investigations, investigations is the road to heaven, God disposes of the base. To wants to real heard truth, and justice to truth, and get truth, received effectiveness, on must in-depth actual, and outreach, and in-depth masses, worship masses for Division, and masses heart, with masses with discussion everyone care of problem, listening they of calls, understand they of mood, feel they of suffering, summary they of experience, concentrated they of wisdom, especially on masses most hope, and most urgent, and most worries, and most complained of hot, and difficulties and focus problem, more to active research, caught not put. Dare to innovate, in our work, often remain \old way doesn't work, the new approach would not\on, the reason, the key is that many people know that copying other people's ideas, mechanically, using someone else's old ways. To change this predicament, requires us to break the shackles of traditional concepts to overcome conservative, conformist, good at finding new problems and to accept new things, summarize new experience, new ideas, developing new programmes and Maverick, a new approach to solve problems, speed up development. Especially in implement superior policy spirit of process in the, both implementation, and cannot mechanically, to to extraordinary of courage and develop enterprising of spirit, put flexibility and principle combined up, put superior of spirit and local reality combined up, Yong conspiracy to breakthrough of policy, and exercise innovation of lift, developed out development works of, and grass-roots welcomes of, and A)1 B)2 C)3 D)4 (31)有以下程序 #include #include int fun(int n) { int *p;

p=(int*)malloc(sizeof(int)); *p=n; return *p; }

main() { int a;

a = fun(10); printf(\}

程序的运行结果是( )。 A)0 B)10 C)20 D)出错 (32)有以下程序 #include

void fun(int a, int b) { int t;

t=a; a=b; b=t; }

main()

{ int c[10]={1,2,3,4,5,6,7,8,9,0), i; for (i=0; i<10; i+=2) fun(c[i], c[i+l]); for (i=0; i<10; i++) printf(\printf(\}

程序的运行结果是( )。 A)l,2,3,4,5,6,7,8,9,0, B)2,l,4,3,6,5,8,7,0,9, C)0,9,8,7,6,5,4,3,2,1, D)

0,1,2,3,4,5,6,7,8,9, (33)有以下程序 #include struct st

二级C 语言程序设计试卷 第 5 页(共9 页) { int x, y;) data[2]={l,10,2,20}; main()

{ struct st *p=data;

printf(\}

程序的运行结果是( )。

A)10,1 B)20,1 C)10,2 D)20,2 (34)有以下程序 #include

ccording to Office Party of mass line education practice activities led group of unified arrangements, units main led to for cadres workers Shang a times party lecture, due to himself level limited, only put this stage concentrated learning of experience today and everyone common with learning exchange, purpose is let we further deep understanding mass line of connotation, insisted party of mass line, do masses work, following main from four a aspects told: a, and full awareness party of mass line education practice activities of major meaning Party's 18 major distinct proposed to focus on the party's advanced nature and purity, in the party, with \c and clean for the people\content of the party's mass line and educational practice. This is comrade XI Jinping as party General Secretary and adhere to strictly administering the party, strengthen the party's major decision is in line with the public expectations and strengthening the construction of learning-oriented service innovation of Marxist party's major deployment, is the important measure to advance the great cause of socialism with Chinese characteristics. First, carry out the party's mass line in education practice, was carrying 18 of the party spirit, summon a powerful force for realizing the great rejuvenation of the Chinese nation the Chinese dream of urgent needs. Party's 18 to promote strategic deployment to building socialism with Chinese characteristics, presents two 100-year goal, namely, by 2020 China's gross domestic product and per capita income of urban and rural residents in 2010 on the basis of double complete the building of a well-off society; the middle of this century into a prosperous, democratic, civilized and harmonious Socialist modern country, and on this basis, the Chinese dream of realizing the great rejuvenation of the Chinese nation. 18 Congress of the party, Comrade XI Jinping repeatedly expounded the Chinese dream. The basic connotation of the Chinese dream, is the national prosperity, national revitalization, the happiness of the people, China important to follow is to keep China Road, carry forward the spirit and cohesion strength of China, dream dreams of the people of China, but determined confidence, enhance self-awareness, achieve self-reliance, to build a stronger China, civilization, harmony, beauty, China, China, China. Strategic conception of China was 18 the spirit of the enrichment and development of the party, conscientiously study the Chinese dream, leading people to hard to realize the Chinese dream, mass education activities in depth the fundamental starting point and ending point. Strengthen the education of the party's mass line, helps to train the collective consciousness of the unity of the party and the people, playing the Chinese dream ideological bases. Comrade Mao Zedong stressed that parties should have \mon language\have \History has

本文来源:https://www.bwwdw.com/article/xjy3.html

Top