[计算机类试卷]国家二级(C语言)笔试模拟试卷237(无答案).doc

上传人:wealthynice100 文档编号:846970 上传时间:2019-02-21 格式:DOC 页数:16 大小:58KB
下载 相关 举报
[计算机类试卷]国家二级(C语言)笔试模拟试卷237(无答案).doc_第1页
第1页 / 共16页
[计算机类试卷]国家二级(C语言)笔试模拟试卷237(无答案).doc_第2页
第2页 / 共16页
[计算机类试卷]国家二级(C语言)笔试模拟试卷237(无答案).doc_第3页
第3页 / 共16页
[计算机类试卷]国家二级(C语言)笔试模拟试卷237(无答案).doc_第4页
第4页 / 共16页
[计算机类试卷]国家二级(C语言)笔试模拟试卷237(无答案).doc_第5页
第5页 / 共16页
点击查看更多>>
资源描述

1、国家二级(C 语言)笔试模拟试卷 237(无答案)1 一个关系中属性个数为 1 时,称此关系为 (A)对应关系 (B)单一关系(C)一元关系 (D)二元关系2 以下叙述中错误的是( )。(A)对于 double 类型数组,不可以直接用数组名对数组进行整体输入或输出(B)数组名代表的是数组所占存储区的首地址,其值不可改变(C)当程序执行中,数组元素的下标超出所定义的下标范围时,系统将给出“下标越界”的出错信息(D)可以通过赋初值的方式确定数组元素的个数3 软件生命周期中花费费用最多的阶段是(A)详细设计(B)软件编码(C)软件测试(D)软件维护4 若某二叉树的前序遍历访问顺序是 abdgcefh

2、,中序遍历访问顺序是 dgbaechf,则其后序遍历的结点访问顺序是(A)bdgcefha(B) gdbecfha(C) bdgaechf(D)gdbehfca5 下列程序的输出结果是_。main() int n; (n=6*4,n+6) ,n*2; printf(“n=%dn“,n) ;(A)22(B) 23(C) 24(D)256 最简单的交换排序方法是(A)快速排序(B)选择排序(C)堆排序(D)冒泡排序7 下述关于数据库系统的叙述中正确的是(A)数据库系统减少了数据冗余(B)数据库系统避免了一切冗余(C)数据库系统中数据的一致性是指数据类型一致(D)数据库系统比文件系统能管理更多的数据

3、8 在长度为 n 的有序线性表中进行二分查找,需要的比较次数为( )。(A)log 2n(B) nlog2n(C) n/2(D)(n+1)/29 在下列设备中,属于输出设备的是 ( )(A)键盘(B)鼠标(C)显示器(D)软盘10 某二叉树共有 60 个叶子结点与 50 个度为 1 的结点,则该二叉树中的总结点数为( )。(A)148(B) 169(C) 182(D)19811 有以下程序 main() int k=5,n=0 ; do switch(k) case 1: case 3:n+=1;k-;break; default:n=0;k-; case 2: case 4:n+=2;k-;

4、break ; printf(“%d“,n); whUe(k0 i+) printf(“%d“,mki; (A)456(B) 258(C) 369(D)78915 运行以下程序后,如果从键盘上输入 65 14回车,则输出结果为_。 main() int m,n; printf(“Enter m,n:“); scanf(“%d%d“, while(m!=n) while(mn)m-=n; while(nm)n-=m; printf(“m=%dn“,m); (A)m=3(B) m=2(C) m=1(D)m=016 下述语句中,_中的 if 语句语法是错误的。 ( )(A)if(xy);(B) if

5、(xy)x+y;(C) if(x! y)seanf(“%d“, y=3*x-4; return y; (A)int(B)不确定(C) void(D)float18 下列叙述中正确的是 _ 。(A)C 语言编译时不检查语法(B) C 语言的子程序有过程和函数两种(C) C 语言的函数可以嵌套定义(D)C 语言中,根据函数能否被其他源文件调用,被区分为内部函数和外部函数19 下列能正确定义且赋初值的语句是( )。(A)int n1=n2=10;(B) char c=32;(C) float f=f+1.1;(D)double x=12.3E2.5;20 C 语言可执行程序的开始执行点是( )。(A

6、)包含文件中的第一个函数(B)程序中第一个函数(C)程序中的 main()函数(D)程序中第一条语句21 有以下程序#includemain( )int C=O,k;for (k=1;k int fun(char s) int n=0; while(*s=0) n=10*n+*s-0;s+; return(n); main() char s10=6,1,*,4,*,9,*,0,*; printf(“%dn“,fun(s); 程序的运行结果是 (A)9(B) 61490(C) 61(D)530 有以下程序 int add (int a,int b)return (a+b); main() int

7、 k,(*f)(),a=5,b=10; f=add; 则以下函数调用语句错误的是 (A)k=(*f)(a,b);(B) k=add(a,b);(C) k=*f(a,b);(D)k=f(a,b);31 以下程序的输出结果是 #include struct st int x;int *y;*p; int dt4=10,20,30,40; struct st aa4=50, main() p=aa; printf(“%dn“,+(p-x); (A)10(B) 11(C) 51(D)6032 以下程序中函数 sort 的功能是对 a 所指数组中的数据进行由大到小的排序; void sort(int a

8、,int n) int i,j,t; for(i=0;in-1;i+) for(j=i+1,jn;j+) if(aiaj) t=ai;ai=aj;aj=t; main() int aa10=1,2,3,4,5,6,7,8,9,10,i; sort( for(i=0;i10;i+)print(“%d,“,aai); printf(n“); 程序运行后的输出结果是( ) 。(A)1,2,3,4,5,6,7,8,9,10(B) 10,9,8,7,6,5,4,3,2,1,(C) 1,2,3,8,7,6,5,4,9,10(D)1,2,10,9,8,7,6,5,4,3,33 有以下程序:#includes

9、tdio.h#includestdio.hmain() char c6; int i=0; for(;j6;ci=getchar(),i+); for(i=0;i6;i+)putchar(ci); printf(“n“); 如果从键盘上输入:ab 回车c 回车 def回车则输出结果为 _。(A)a b c d e f(B) a b c d(C) ab c d(D)abcdef34 现有如下程序段 #include“stdio.h“ main() int a56=23,3,65,21,6,78 ,28;5,67,25,435, 76,8,22,45,7,8,34,6,78,32,4,5,67,4

10、,21,1; int i=0,j=5; printf(“%dn“ ,*( 上述程序的输出结果是 _。(A)运行错误(B) 100(C) i 的地址(D)j 的地址37 若有如下程序: void a(char*p,char c) while(*p) if(*p=c)*p=c-b+B;; p+; main() char s50=“abcdeeffgee“,b=e; a(s,b);printf(“%sn“,s); 则程序运行后的输出结果是( )。(A)Abcdeeffgee(B) ABCDeeFFGee(C) abcdEEffgEE(D)ABCDEEFFGEE38 C 语言提供的合法的数据类型关键字

11、是_。(A)Double(B) float(C) integer(D)Char39 设有以下语句: char strl=“string“ ,str28,*str3,*str4=“string“; 则_不是对库函数的正确调用。(A)strcpy(strl,“HELLO1“);(B) strcpy(str2,“HELLO2“);(C) strcpy(str3,“HELLO3“);(D)strcpy(str4,“HELLO4“);40 在下列字符序列中,合法的标识符是 ( )(A)P12 现要将 q 和 r 所指结点交换前后位置,同时要保持链表的连续,以下不能完成此操作的语句是_。(A)q- nex

12、t=r-next; p-next=r,r-next=q ;(B) p-next=r ,q- next=r-next;r- next=q;(C) q-next=r-next;r- next=q;p- next=r,(D)r-next=q;P-next=r;q-next=r- next ;42 实现算法所需的存储单元多少和算法的工作量大小分别称为为算法的【 】。43 软件需求规格说明书应具有完整性、无歧义性、正确性、可验证性、可修复性等特性,其中最重要的是( )。44 数据字典是各类数据描述的集合,它通常包括五个部分,即数据项、数据结构、数据流、【 】和处理过程。45 下列程序的输出结果是【 】。

13、#include stdio.h int fun(int x, int y) static int m 0,i=2;i+=m+1;m=i+x+y;return m;main() int j=4,m=1,k;k=fun(j,m); printf(“%d,“,k);k=fun(j,m); printf(“%dn“,k);46 按照逻辑结构分类,结构可以分为线性结构和非线性结构,栈属于_。47 已知字母 A 的 ASCII 码为 65,以下程序运行后的输出结果是【 】。main() char a, b;a=A+5-3; b=a+6-2;printf(“% d % cn“, a, b);48 下面程序

14、的输出结果是( )。 #include stdio.h main() static chara=“zhao“,b=“juan“; char*ptr1=a,*ptr2=b; int k; for(k=0;k4;k+) if(*(ptr1+k)=*(ptr2+k) printf(“%c“,*(ptr1+k);49 以下程序的输出结果是( )。 #include stdio.h void 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); f2=f1;f1=f

15、 ; printf(“n“); 49 以下程序的功能是:求出数组 x 中各相邻两个元素的和依次存放到 a 数组中,然后输出。请填空。main()int x10,a9,i;for(i=0;i10 ;i+)scanf(“%d“,i0;i-) stri=stri-1);str0=temp; main() char s50; int n, i, z ;scanf(“%d,%s”, i =n;i+)move (s,z);printf(“%sn”,s); 54 以下程序运行后的输出结果是_。main() int a=3,b=4,c=5,t=99 ;i(ba double y=1; for(i=1;i =n;i+) y=y*x;return y; 主函数中已经正确定义 m,a,b 变量并赋值,并调用 fun 函数计算:m=a4+b4-(a+b)3。实现这一计算的函数调用语句为 【 】 。

展开阅读全文
相关资源
猜你喜欢
  • EN ISO 12966-1-2014 en Animal and vegetable fats and oils - Gas chromatography of fatty acid methyl esters - Part 1 Guidelines on modern gas chromatography of fatty acid methyl est.pdf EN ISO 12966-1-2014 en Animal and vegetable fats and oils - Gas chromatography of fatty acid methyl esters - Part 1 Guidelines on modern gas chromatography of fatty acid methyl est.pdf
  • EN ISO 12966-2-2011 en Animal and vegetable fats and oils - Gas chromatography of fatty acid methyl esters - Part 2 Preparation of methyl esters of fatty acids《动物和植物的脂肪和油 脂肪酸甲酯的气相色.pdf EN ISO 12966-2-2011 en Animal and vegetable fats and oils - Gas chromatography of fatty acid methyl esters - Part 2 Preparation of methyl esters of fatty acids《动物和植物的脂肪和油 脂肪酸甲酯的气相色.pdf
  • EN ISO 12966-2-2017 en Animal and vegetable fats and oils - Gas chromatography of fatty acid methyl esters - Part 2 Preparation of methyl esters of fatty acids《动植物油脂脂肪酸甲酯的气相色谱第2部分 .pdf EN ISO 12966-2-2017 en Animal and vegetable fats and oils - Gas chromatography of fatty acid methyl esters - Part 2 Preparation of methyl esters of fatty acids《动植物油脂脂肪酸甲酯的气相色谱第2部分 .pdf
  • EN ISO 12966-3-2009 0625 Animal and vegetable fats and oils - Gas chromatography of fatty acid methyl esters - Part 3 Preparation of methyl esters using trimethylsulfonium hydroxid.pdf EN ISO 12966-3-2009 0625 Animal and vegetable fats and oils - Gas chromatography of fatty acid methyl esters - Part 3 Preparation of methyl esters using trimethylsulfonium hydroxid.pdf
  • EN ISO 12966-3-2016 en Animal and vegetable fats and oils - Gas chromatography of fatty acid methyl esters - Part 3 Preparation of methyl esters using trimethylsulfonium hydroxide .pdf EN ISO 12966-3-2016 en Animal and vegetable fats and oils - Gas chromatography of fatty acid methyl esters - Part 3 Preparation of methyl esters using trimethylsulfonium hydroxide .pdf
  • EN ISO 12966-4-2015 en Animal and vegetable fats and oils - Gas chromatography of fatty acid methyl esters - Part 4 Determination by capillary gas chromatography《动植物油脂 脂肪酸甲酯的气相色谱法 .pdf EN ISO 12966-4-2015 en Animal and vegetable fats and oils - Gas chromatography of fatty acid methyl esters - Part 4 Determination by capillary gas chromatography《动植物油脂 脂肪酸甲酯的气相色谱法 .pdf
  • EN ISO 12967-1-2011 en Health informatics - Service architecture - Part 1 Enterprise viewpoint《医疗信息学 服务体系机构 第1部分 企业观点》.pdf EN ISO 12967-1-2011 en Health informatics - Service architecture - Part 1 Enterprise viewpoint《医疗信息学 服务体系机构 第1部分 企业观点》.pdf
  • EN ISO 12967-2-2011 en Health informatics - Service architecture - Part 2 Information viewpoint《医疗信息学 服务体系机构 第2部分 信息观点》.pdf EN ISO 12967-2-2011 en Health informatics - Service architecture - Part 2 Information viewpoint《医疗信息学 服务体系机构 第2部分 信息观点》.pdf
  • EN ISO 12967-3-2011 en Health informatics - Service architecture - Part 3 Computational viewpoint《健康信息学 服务架构 计算观点》.pdf EN ISO 12967-3-2011 en Health informatics - Service architecture - Part 3 Computational viewpoint《健康信息学 服务架构 计算观点》.pdf
  • 相关搜索

    当前位置:首页 > 考试资料 > 职业资格

    copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
    备案/许可证编号:苏ICP备17064731号-1