[计算机类试卷]国家二级(C语言)章节练习试卷20及答案与解析.doc

上传人:figureissue185 文档编号:503240 上传时间:2018-11-29 格式:DOC 页数:6 大小:30.50KB
下载 相关 举报
[计算机类试卷]国家二级(C语言)章节练习试卷20及答案与解析.doc_第1页
第1页 / 共6页
[计算机类试卷]国家二级(C语言)章节练习试卷20及答案与解析.doc_第2页
第2页 / 共6页
[计算机类试卷]国家二级(C语言)章节练习试卷20及答案与解析.doc_第3页
第3页 / 共6页
[计算机类试卷]国家二级(C语言)章节练习试卷20及答案与解析.doc_第4页
第4页 / 共6页
[计算机类试卷]国家二级(C语言)章节练习试卷20及答案与解析.doc_第5页
第5页 / 共6页
点击查看更多>>
资源描述

1、国家二级( C语言)章节练习试卷 20 及答案与解析 1 以下程序的功能是进行位运算。 main() unsigned char a,b; a=73;b=-4 j+; while(j 4); printf(“%dn“, s); 11 有如下程序 main() int a33=1, 2, 3, 4, 5, 6, i,j,s=0; for(i=1; i 3; i+) for(j=0;j =i;j+)s+=aij; printf(“%dn“, s); 该程序的输出结果是 _。 12 以下程序中, fun()函数的功能是求 3行 4列二维数组每行元素中的最大值,请填空。 void fun(int,in

2、t,int(*)4,int*); main() int a34=12,41,36,28,19,33,15,27, 3,27,19,1, b3, i; fun(3, 4, a, b); for(i=0; i 3; i+)printf(“%4d“, bi); printf(“n“); void fun(int m,int n,int ar4,int *br) int i,j,x; for(i=0; i m; i+) x=ari0; for(j=0;j n;j+) if(x arij)x=arij; _=x; 13 若有以下定义: int a8; 则 a数组元素的下标上限为 _,下限为 _。 14

3、若有定义: int a33=1,2, 3, 4,5,6; 则初始化后, a11得到的初值是 _, a21得到的初值是 _。 15 下列程序是处理 C盘根目录下的 a.txt文件,统计该文件中字符的个数。请填空,使程序完整。 #include stdio.h main() FILE*fp; char ch; long num=0; if(_) printf(“Cant open file !n“); exit(0); while(_) ch=fgetc(fp); _; printf(“%d“, num); fclose(fp); 国家二级( C语言)章节练习试卷 20 答案与解析 1 【正确答案】 A 2 【正确答案】 C 3 【正确答案】 C 4 【正确答案】 A 5 【正确答案】 D 6 【正确答案】 *(p+5)或 p5 7 【正确答案】 24 8 【正确答案】 *p a0 9 【正确答案】 p=I 10 【正确答案】 92 11 【正确答案】 18 12 【正确答案】 bri 13 【正确答案】 7 0 14 【正确答案】 0 5 15 【正确答案】 (fp=fopen(“c: a.txt“), “r“)=NULL , !feof (fp) , fputc (ch,fp);

展开阅读全文
相关资源
猜你喜欢
  • BS PD IEC TS 62763-2013_5284 Pilot function through a control pilot circuit using PWM (pulse width modulation) and a control pilot wire《通过控制导向线使用PWM (脉冲宽度调制) 的导向功能和控制导向线》.pdf BS PD IEC TS 62763-2013_5284 Pilot function through a control pilot circuit using PWM (pulse width modulation) and a control pilot wire《通过控制导向线使用PWM (脉冲宽度调制) 的导向功能和控制导向线》.pdf
  • BS ISO 8070-2007 Milk and milk products - Determination of calcium sodium potassium and magnesium contents - Atomic absorption spectrometric method《牛奶和奶制品 钙、钠、钾和镁含量的测定 原子吸.pdf BS ISO 8070-2007 Milk and milk products - Determination of calcium sodium potassium and magnesium contents - Atomic absorption spectrometric method《牛奶和奶制品 钙、钠、钾和镁含量的测定 原子吸.pdf
  • BS ISO 8082-1-2009 Self-propelled machinery for forestry - Laboratory tests and performance requirements for roll-over protective structures - General machines《林业用自推进机械 防倾.pdf BS ISO 8082-1-2009 Self-propelled machinery for forestry - Laboratory tests and performance requirements for roll-over protective structures - General machines《林业用自推进机械 防倾.pdf
  • BS ISO 8082-2-2011 Self-propelled machinery for forestry Laboratory tests and performance requirements for roll-over protective structures Machines having a rotating platf.pdf BS ISO 8082-2-2011 Self-propelled machinery for forestry Laboratory tests and performance requirements for roll-over protective structures Machines having a rotating platf.pdf
  • BS ISO 8083-2006 Machinery for forestry - Falling-object protective structures (FOPS) - Laboratory tests and performance requirements《林业机械 落体防护装置(FOPS) 实验室试验和性能要求》.pdf BS ISO 8083-2006 Machinery for forestry - Falling-object protective structures (FOPS) - Laboratory tests and performance requirements《林业机械 落体防护装置(FOPS) 实验室试验和性能要求》.pdf
  • BS ISO 8086-2004 Dairy plant - Hygiene conditions - General guidance on inspection and sampling procedures《乳品厂 卫生条件 检验和取样程序通用指南》.pdf BS ISO 8086-2004 Dairy plant - Hygiene conditions - General guidance on inspection and sampling procedures《乳品厂 卫生条件 检验和取样程序通用指南》.pdf
  • BS ISO 8096-2005 Rubber- or plastics-coated fabrics for water resistant clothing - Specification《雨衣用橡胶或塑料涂覆织物 规范》.pdf BS ISO 8096-2005 Rubber- or plastics-coated fabrics for water resistant clothing - Specification《雨衣用橡胶或塑料涂覆织物 规范》.pdf
  • BS ISO 8097-2001 Aircraft Minimum airworthiness requirements and test conditions for certified air cargo unit load devices《航空器 经认证的航空货运集装单元装置最低适航性要求和试验条件》.pdf BS ISO 8097-2001 Aircraft Minimum airworthiness requirements and test conditions for certified air cargo unit load devices《航空器 经认证的航空货运集装单元装置最低适航性要求和试验条件》.pdf
  • BS ISO 8114-1993 Textile machinery and accessories - Spindles for ring-spinning and doubling machines - List of equivalent terms《纺织机械和附件 环锭纺纱机和并线机用锭子 同义术语表》.pdf BS ISO 8114-1993 Textile machinery and accessories - Spindles for ring-spinning and doubling machines - List of equivalent terms《纺织机械和附件 环锭纺纱机和并线机用锭子 同义术语表》.pdf
  • 相关搜索

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

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