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

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

1、国家二级(C 语言)笔试模拟试卷 163(无答案)1 下列选项中,不是一个算法的基本特征的是( )。 (A)完整性 (B)可行性(C)有穷性 (D)拥有足够的情报2 下列数据结构中,属于非线性的是( )。 (A)线性表 (B)队列(C)树 (D)栈3 下列叙述中错误的是( )。 (A)线性表是由 n 个元素组成的一个有限序列(B)线性表是一种线性结构(C)线性表的所有结点有且仅有一个前件和后件(D)线性表可以是空表4 按照“先进先出 ”组织数据的数据结构是 ( )。 (A)队列 (B)栈(C)双向链表 (D)二叉树5 下列关于线性链表的描述中正确的是( )。 (A)存储空间不一定连续,且各元素

2、的存储顺序是任意的(B)存储空间不一定连续,且前件元素一定存储在后件元素的前面(C)存储空间必须连续,且各前件元素一定存储在后件元素的前面(D)存储空间必须连续,且各元素的存储顺序是任意的6 某二叉树共有 60 个叶子结点与 50 个度为 1 的结点,则该二叉树中的总结点数为( )。 (A)148 (B) 169(C) 182 (D)1987 下列数据结构中,能用二分法进行查找的是( )。 (A)顺序存储的有序线性表 (B)结性链表(C)二叉链表 (D)有序线性链表8 简单的交换排序方法是( )。 (A)快速排序 (B)选择排序(C)堆排序 (D)冒泡排序9 对于长度为 n 的线性表,在最坏情

3、况下,下列各种排序法所对应的比较次数中,正确的是( )。 (A)冒泡排序为 n/2 (B)冒泡排序为 n(C)快速排序为 n (D)快速排序为 n(n-1)/210 结构化程序设计的 3 种基本结构是( )。 (A)过程、子程序和分程序 (B)顺序、选择和重复(C)递归、堆栈和队列 (D)调用、返回和转移11 下列叙述中错误的是( )。 (A)在 C 语言中的保留字必须小写(B)变量的存储类型决定了变量的存储位置及其生存期(C)宏定义以#define 开头,行未必须加分号(D)在 C 语言中的注释行可以出现在程序的任何位置12 若有运算符: 、=、%、sizeof ,则它们按优先级 (由高至低

4、)的正确排列顺序为 ( ) 。 (A)% 、sizeof 、=(B) sizeof、 %、 =、(C) sizeof、 、% 、=(D)sizeof、%、=13 已知 int a=2,b=3;则执行表达式 a=ab 后,变量 a 的值为( )。 (A)0 (B) 1(C) 2 (D)314 假定 w、x、y、m 均为 int 型变量,则执行下列的语句后,m 的值是( )。 w=6,x=4,y=3; m=(wx)?W:X; m=(m y)?m:y; (A)3 (B) 4(C) 5 (D)615 若变量 a,b 已正确定义,且 b 已正确赋值,则合法的语句是( )。 (A)b=double(b);

5、 (B) +b;(C) a=a+=5; (D)a=double(b);16 执行下列程序中的输出语句后,a 的值是( ) 。 main() int a ; printf(“%dn“,(a=2*3,a*5,a+7); (A)17 (B) 37(C) 6 (D)1317 若有下列定义(设 int 类型变量占 2 个字节): int i=8; 则下列语句: printf(“i=%08d“,i); 输出的结果是( )。 (A)i=8 , (B) i=00000008,(C) i=08, (D)818 两次运行下列的程序,如果从键盘上分别输入 3 和 1,则输出结果是( )。 main() int x;

6、 scanf(“%d“, int f2(int x,int y)return xy?y:x; main() int a=4,b=3,c=5,d=2,e,f,g; e=f2(f1(a,b),f1(c,d);f=f1(f2(a,b),f2(c,d); g=a+b+c+d-e-f printf(“%d,%d,%dn“,e,f,g); (A)while 循环执行 10 次 (B)循环是无限循环(C)循环体语句一次也不执行 (D)循环体语句执行一次22 设有程序段: int k=12; while(k=1) k=k-1; 则下列描述中正确的是( )。 (A)0 (B) 1(C) TRUE (D)FALS

7、E23 在执行完下列的 C 语句段之后,则 B 的值是( )。 Char a=“A“; int b; B=(34 该函数的类型是( )。 (A)27 (B) 6(C) 25 (D)3025 下列程序中函数 reverse()的功能是将 a 所指数组中的内容进行逆置。 #includestdio.h void reverse(int a,int n) int i,t; for(i=0;in/2,i+) t=ai;ai=an-1-i;an-1-i=t; main() int b10=1,2,3,4,5,6,7,8,9,10;int i,s=0; reverse(b,(A)ptr 是一个返回值是血的

8、函数(B) ptr 是指向 int 型数据的指针变量(C) ptr 是指向函数的指针,该函数返回一个 int 型数据(D)ptr 是一个函数名,该函数的返回值是指向血型数据的指针26 语句 int(*ptr)()的含义是( )。 (A)(!a=1),则下列选项中值为 0 的表达式是( )。 (A)任意正奇数 (B)任意负偶数(C)任意正偶数 (D)任意负奇数28 有下列程序段: int n,t=1,s=0; scanf(“%d“,t=t-2;while(t!=n); 为使此程序段不陷入死循环,从键盘输入的数据应该是( )。 (A)4,4 (B) 2,2(C) 4,5 (D)2,429 下列程序

9、的输出结果是( )。 #include stdio.h void main() int b6=2,4,6,8,10,12; int*p-b,*q=scanf(“%1f“,p) ;(B) *p=scanf(“%f“,p);(C) p=scanf(“%1f“,*p);(D)p=scanf(“%1f“,p) ;30 若有说明语句:double *p,a ;则能通过 scanf 语句正确给输入项读入数据的程序段是 ( )。 (A)6357 (B) 6135(C) 1357 (D)69135731 下列程序的输出结果是( )。 #inCludestdio.h main() char ch25=“1234

10、“,“5678,*p2; int i,j,s=0; for(i=0;i2;i+) pi=chi; for(i=0;i2;i+) for(j=0;pij 0;j+=2) s=pij-0; (A)8 (B) 7(C) 12 (D)932 下列程序的输出结果是( )。 #inclUdestdio.h main() inta23=1,2,3,4,5,6,(*p)3,i; p=a; for(i=0;i3;i+) if(i2) p1i=p1i-1; else p1i=1; printf(“%dn“,a01+a11+a12 ; (A)15 (B) 10(C) 7 (D)833 字符串“ABCDEn“的长度是

11、( )。 (A)strcpy(str2,str1) (B) strcpy(str3,str1)(C) strcpy(str4,str1) (D)strcpy(str5,str1)34 若有下列说明,则( )不是对 strcpy 库函数的正确的调用。strcpy 库函数用于复制一个字符串:char*strl=“abcd“,str210,*str3=“hijklmn“,*str42,*str5=“aaaa“; (A)language (B) lnug(C)有语法错误 (D)lang35 下列程序段的输出结果为( )。 #include stdio.h main() static char a=“l

12、anguage“; char*p; p=a ; for(p=a;pa+8;p+=2) putchar(*p); (A)1 (B) 4(C) 9 (D)036 执行下列程序后,输出的结果是( )。 #includestdio.h #define S(X)X*X void main() int a=9,k=3,m=2; a/=S(k+m)/S(k+m); printf(“%d“,a); (A)(*p) .data.a (B) (*p) .a;(C) p-data.a (D)p.data.a37 已知有结构体: struct sk int a; float b; data,*p; 若有 p=floa

13、t y;char z;st ; 则下列的叙述中不正确的是( )。 (A)00001111 (B) 11111101(C) 00000010 (D)1100000039 设 x=015,则 x=x017 的值是( )。 (A)EOF (B) -1(C)非零值 (D)039 在面向对象程序设计中,从外面看只能看到对象有外部特征,而不知道也无需知道数据的具体结构以及实现操作的算法,这称为对象的_。39 软件工程研究的内容主要包括:_技术和软件工程管理。39 表达式 pow(2.8,sqrt(float(x)值的数据类型为_型。39 下列表达式用于判断 y 是否为闰年。闰年的判断条件是:年号能被 4

14、整除但不能被 100 整除或年号能被 400 整除,请填空_。39 下列程序的运行结果是_。#includestdio.h main() int a=10,b=3;printf(“%d“,a%b);printf(“%d,(a-b,a+b);printf(“%dn“,a-b?a-b:a+b);39 要求使下列程序输出 5 个整数,请填空。for(i=0;i=_;printf(“%dn“,i+=2);39 下列的 for 语句的循环次数为_。for(x=1,y=0;(y!=19)x+);39 函数调用语句:“fgets(buf,n,fp);”从中指向的文件中读入 n 个字符放到 buf 字符数组中

15、,函数返回值为_。39 若有下列定义:int a=1,2,3,4,5,6,7,8,9,10,*p=a;,则值为 3 的表达式为:_。39 若有说明 char s1=“That girl“,s2=“is beautiful“;则使用函数 strcmp(s1,s2)后,结果是_。39 在宏定义#define P13.14159 中,用宏名 PI 代替一个_。39 下列程序的输出结果是_。#includestdio.h sb(int s,int b)static int n=3;b=sn;n-;return(b);main() int s=1,5,6,8;int i,x=0;for(i=0;i4;i+)x=sb(s,x);printf(“%d“,x);printf(“n“);

展开阅读全文
相关资源
猜你喜欢
  • CAN CSA-ISO IEC TR 24720-2014 Information technology - Automatic identification and data capture techniques - Guidelines for direct part marking (DPM).pdf CAN CSA-ISO IEC TR 24720-2014 Information technology - Automatic identification and data capture techniques - Guidelines for direct part marking (DPM).pdf
  • CAN CSA-ISO IEC TR 24729-1-2014 Information technology - Radio frequency identification for item management - Implementation guidelines - Part 1 RFID-enabled labels and packaging s.pdf CAN CSA-ISO IEC TR 24729-1-2014 Information technology - Radio frequency identification for item management - Implementation guidelines - Part 1 RFID-enabled labels and packaging s.pdf
  • CAN CSA-ISO IEC TR 24729-2-2014 Information technology - Radio frequency identification for item management - Implementation guidelines - Part 2 Recycling and RFID tags.pdf CAN CSA-ISO IEC TR 24729-2-2014 Information technology - Radio frequency identification for item management - Implementation guidelines - Part 2 Recycling and RFID tags.pdf
  • CAN CSA-ISO IEC TR 24729-3-2014 Information technology - Radio frequency identification for item management - Implementation guidelines - Part 3 Implementation and operation of UHF.pdf CAN CSA-ISO IEC TR 24729-3-2014 Information technology - Radio frequency identification for item management - Implementation guidelines - Part 3 Implementation and operation of UHF.pdf
  • CAN CSA-ISO IEC TR 24729-4-2014 Information technology - Radio frequency identification for item management - Implementation guidelines - Part 4 Tag data security.pdf CAN CSA-ISO IEC TR 24729-4-2014 Information technology - Radio frequency identification for item management - Implementation guidelines - Part 4 Tag data security.pdf
  • CAN CSA-ISO IEC TR 24731-1-2012 Information technology  Programming languages their environments and system software interfaces  Extensions to the C library  Part 1 Bounds-checking.pdf CAN CSA-ISO IEC TR 24731-1-2012 Information technology Programming languages their environments and system software interfaces Extensions to the C library Part 1 Bounds-checking.pdf
  • CAN CSA-ISO IEC TR 24731-2-2012 Information technology  Programming languages their environments and system software interfaces  Extensions to the C library  Part 2 Dynamic Allocat.pdf CAN CSA-ISO IEC TR 24731-2-2012 Information technology Programming languages their environments and system software interfaces Extensions to the C library Part 2 Dynamic Allocat.pdf
  • CAN CSA-ISO IEC TR 24732-2012 Information technology  Programming languages their environments and system software interfaces  Extension for the programming language C to support d.pdf CAN CSA-ISO IEC TR 24732-2012 Information technology Programming languages their environments and system software interfaces Extension for the programming language C to support d.pdf
  • CAN CSA-ISO IEC TR 24746-2006 Information technology – Generic cabling for customer premises – Mid-span DTE power insertion.pdf CAN CSA-ISO IEC TR 24746-2006 Information technology – Generic cabling for customer premises – Mid-span DTE power insertion.pdf
  • 相关搜索

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

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