【计算机类职业资格】国家二级C语言机试(操作题)模拟试卷372及答案解析.doc

上传人:cleanass300 文档编号:1332186 上传时间:2019-10-17 格式:DOC 页数:2 大小:34KB
下载 相关 举报
【计算机类职业资格】国家二级C语言机试(操作题)模拟试卷372及答案解析.doc_第1页
第1页 / 共2页
【计算机类职业资格】国家二级C语言机试(操作题)模拟试卷372及答案解析.doc_第2页
第2页 / 共2页
亲,该文档总共2页,全部预览完了,如果喜欢就下载吧!
资源描述

1、国家二级 C语言机试(操作题)模拟试卷 372及答案解析(总分:6.00,做题时间:90 分钟)一、程序填空题(总题数:1,分数:2.00)1.函数 fun的功能是:计算 (分数:2.00)_二、程序修改题(总题数:1,分数:2.00)2.给定程序 MODI1C 中函数 fun的功能是:从 3个红球,5 个白球,6 个黑球中任意取出 8个作为一组,进行输出。 在每组中,可以没有黑球,但必须要有红球和白球。 组合数作为函数值返回。正确的组合数应该是 15。程序中 i的值代表红球数,j 的值代表白球数,k 的值代表黑球数。 请改正函数 fun中指定部位的错误,使它能得出正确的结果。 注意:不要改动

2、 maln函数,不得增行或删行,也不得更改程序的结构! #include int fun() int i,j ,k,sum=0; printf(“/nThe result :/n/n“) ; k=8ij; /*found*/ if(K=0 K=0 K=0k=1&K=0k=6)”。三、程序设计题(总题数:1,分数:2.00)3.请编写函数 fun,其功能是:计算并输出下列多项式的值: (分数:2.00)_正确答案:(正确答案:1 double s=1; 2 long t=1; 3 int i; 4 for(i=1; i=n ; i+) 5 t=t* i ;/* 计算阶乘* / 6 s+=1/t; /* 计算每项值并累加至 s中* / 7 8 jreturn s ;/* 返回多项式的值* /)解析:解析:该程序功能是计算并输出多项式的值。该题的解题思路是,根据题干中给出的数列,首先推出每一项的表达式,然后再对多项式进行累加求和。

展开阅读全文
相关资源
猜你喜欢
  • NF M60-704-1992 Decontamination of radioactively contaminated surfaces Testing of decontamination agents for textiles 《放射性污染表面的去污 纺织品用去污剂的检测》.pdf NF M60-704-1992 Decontamination of radioactively contaminated surfaces Testing of decontamination agents for textiles 《放射性污染表面的去污 纺织品用去污剂的检测》.pdf
  • NF M60-750-1989 Decontamination of radioactively contaminated surfaces Method for testing and assessing the ease of decontamination 《放射性污染的表面去污 检测和评价去污难易程度的方法》.pdf NF M60-750-1989 Decontamination of radioactively contaminated surfaces Method for testing and assessing the ease of decontamination 《放射性污染的表面去污 检测和评价去污难易程度的方法》.pdf
  • NF M60-759-2005 Nuclear energy - Measurement of environmental radioactivity - Air - Determination of the volumic activity of iodine in the atmospheric environment 《核能 环境放射性的测量 空气 大.pdf NF M60-759-2005 Nuclear energy - Measurement of environmental radioactivity - Air - Determination of the volumic activity of iodine in the atmospheric environment 《核能 环境放射性的测量 空气 大.pdf
  • NF M60-770-2000 Nuclear energy - Measurment of environnemental radioactivity-Air - Determination of the activity concentration for atmospheric deposits on the soil 《核能 环境放射性的测量 空气 .pdf NF M60-770-2000 Nuclear energy - Measurment of environnemental radioactivity-Air - Determination of the activity concentration for atmospheric deposits on the soil 《核能 环境放射性的测量 空气 .pdf
  • NF M60-780-0-2001 Nuclear energy - Measurement of radioactivity in the environment - Bioindicators - Part 0  general principles 《核能 环境中放射性的测量 生物指示剂 第0部分 一般原理》.pdf NF M60-780-0-2001 Nuclear energy - Measurement of radioactivity in the environment - Bioindicators - Part 0 general principles 《核能 环境中放射性的测量 生物指示剂 第0部分 一般原理》.pdf
  • NF M60-780-1-2001 Nuclear energy - Measurement of radioactivity in the environment - Bioindicators - Part 1  guidance for the design of sampling programs 《核能 环境中放射性的测量 生物指示剂 第1部分 取.pdf NF M60-780-1-2001 Nuclear energy - Measurement of radioactivity in the environment - Bioindicators - Part 1 guidance for the design of sampling programs 《核能 环境中放射性的测量 生物指示剂 第1部分 取.pdf
  • NF M60-780-2-2001 Nuclear energy - Measurement of radioactivity in the environment - Bioindicators - Part 2  guidance for sampling technicals 《核能 环境中放射性的测量 生物指示剂 第2部分 取样技术指南》.pdf NF M60-780-2-2001 Nuclear energy - Measurement of radioactivity in the environment - Bioindicators - Part 2 guidance for sampling technicals 《核能 环境中放射性的测量 生物指示剂 第2部分 取样技术指南》.pdf
  • NF M60-780-3-1997 Nuclear energy Measurement of radioactivity in the environment Bioindicators Part 3  general guide for the storage and handling of samples 《核能 环境中放射性测量 生物指示器 第3部分.pdf NF M60-780-3-1997 Nuclear energy Measurement of radioactivity in the environment Bioindicators Part 3 general guide for the storage and handling of samples 《核能 环境中放射性测量 生物指示器 第3部分.pdf
  • NF M60-780-4-1997 Nuclear energy Measurement of radioactivity in the environment Bioindicators Part 4  general guide for the preparation of samples 《原子能 环境中放射性的测量 生物指示 第4部分 样品制备通用指.pdf NF M60-780-4-1997 Nuclear energy Measurement of radioactivity in the environment Bioindicators Part 4 general guide for the preparation of samples 《原子能 环境中放射性的测量 生物指示 第4部分 样品制备通用指.pdf
  • 相关搜索

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

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