【计算机类职业资格】二级C语言机试54及答案解析.doc

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

1、二级 C 语言机试 54 及答案解析(总分:100.00,做题时间:90 分钟)一、B填空题/B(总题数:1,分数:30.00)1.请补充函数 fun(),该函数的功能求能整除 x 且是偶数的数,把这些数保存在数组 bb 中,并按从大到小的顺序输出。 例如当 x=20 时,依次输出:20 10 4 2。 注意:部分源程序给出如下。 请勿改动主函数 main 和其他函数中的任何内容,仅在函数 fun()的横线上填入所编写的若干表达式或语句。 试题程序:#includeconioh #includestdioh void fun(int k,int bb ) int i; int j=0; for

2、U 【l】 /U;i=k;i+) if(U 【2】 /U) bbi+=i; printf(“/n/n“); for(i=U 【3】 /U;i=0;i-) printf(“%d“,bbi); main( ) int k=1; int bb100;clrscr( ); printf(“/nPlease input X=“); scanf(“%d“,i=0;i-) printf(“%d“,bbi); main( ) int k=1; int bb100;clrscr( ); printf(“/nPlease input X=“); scanf(“%d“,ik;i=i+2) /*将 s 所指字符串中下标为偶数的字符存入 t 所指字符串中*/ tj+=si; tj=/0; /*在字符串最后加上结束标志*/ 解析 本题使用了一种 i 永远是偶数的循环方法,即for(i=0;ik;i=i+2),因为开始时 i 的值为 0,当 i+2 循环时,此值永远是偶数。

展开阅读全文
相关资源
猜你喜欢
  • ASTM E1474-2014 Standard Test Method for Determining the Heat Release Rate of Upholstered Furniture and Mattress Components or Composites Using a Bench Scale Oxygen Consumption Cal.pdf ASTM E1474-2014 Standard Test Method for Determining the Heat Release Rate of Upholstered Furniture and Mattress Components or Composites Using a Bench Scale Oxygen Consumption Cal.pdf
  • ASTM E1475-2002 Standard Guide for Data Fields for Computerized Transfer of Digital Radiological Test Data《数字放射性测试数据的计算机化传输数据组的标准指南》.pdf ASTM E1475-2002 Standard Guide for Data Fields for Computerized Transfer of Digital Radiological Test Data《数字放射性测试数据的计算机化传输数据组的标准指南》.pdf
  • ASTM E1475-2002(2008) Standard Guide for Data Fields for Computerized Transfer of Digital Radiological Examination Data《数字放射性测试数据的计算机化传输数据组的标准指南》.pdf ASTM E1475-2002(2008) Standard Guide for Data Fields for Computerized Transfer of Digital Radiological Examination Data《数字放射性测试数据的计算机化传输数据组的标准指南》.pdf
  • ASTM E1475-2013 Standard Guide for Data Fields for Computerized Transfer of Digital Radiological Examination Data《数字放射性检查数据的计算机化传输数据域的标准指南》.pdf ASTM E1475-2013 Standard Guide for Data Fields for Computerized Transfer of Digital Radiological Examination Data《数字放射性检查数据的计算机化传输数据域的标准指南》.pdf
  • ASTM E1475-2013(2018) Standard Guide for Data Fields for Computerized Transfer of Digital Radiological Examination Data.pdf ASTM E1475-2013(2018) Standard Guide for Data Fields for Computerized Transfer of Digital Radiological Examination Data.pdf
  • ASTM E1476-2004 Standard Guide for Metals Identification Grade Verification and Sorting《金属识别、定级和分类的标准指南》.pdf ASTM E1476-2004 Standard Guide for Metals Identification Grade Verification and Sorting《金属识别、定级和分类的标准指南》.pdf
  • ASTM E1476-2004(2010) Standard Guide for Metals Identification Grade Verification and Sorting《金属识别 定级 和分类的标准指南》.pdf ASTM E1476-2004(2010) Standard Guide for Metals Identification Grade Verification and Sorting《金属识别 定级 和分类的标准指南》.pdf
  • ASTM E1476-2004(2014) Standard Guide for Metals Identification Grade Verification and Sorting《金属识别 定级和分类的标准指南》.pdf ASTM E1476-2004(2014) Standard Guide for Metals Identification Grade Verification and Sorting《金属识别 定级和分类的标准指南》.pdf
  • ASTM E1477-1998a(2003) Standard Test Method for Luminous Reflectance Factor of Acoustical Materials by Use of Integrating-Sphere Reflectometers《使用集成球形反射计测定音响材料反光因素的标准试验方法》.pdf ASTM E1477-1998a(2003) Standard Test Method for Luminous Reflectance Factor of Acoustical Materials by Use of Integrating-Sphere Reflectometers《使用集成球形反射计测定音响材料反光因素的标准试验方法》.pdf
  • 相关搜索

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

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