【计算机类职业资格】三级信息管理技术机试-215及答案解析.doc

上传人:testyield361 文档编号:1320685 上传时间:2019-10-17 格式:DOC 页数:4 大小:28KB
下载 相关 举报
【计算机类职业资格】三级信息管理技术机试-215及答案解析.doc_第1页
第1页 / 共4页
【计算机类职业资格】三级信息管理技术机试-215及答案解析.doc_第2页
第2页 / 共4页
【计算机类职业资格】三级信息管理技术机试-215及答案解析.doc_第3页
第3页 / 共4页
【计算机类职业资格】三级信息管理技术机试-215及答案解析.doc_第4页
第4页 / 共4页
亲,该文档总共4页,全部预览完了,如果喜欢就下载吧!
资源描述

1、三级信息管理技术机试-215 及答案解析(总分:100.00,做题时间:90 分钟)一、上机题(总题数:1,分数:100.00)1.已知数据文件 in.dat 中存有 200 个 4 位数,并已调用读函数 ReadDat()把这些数存入数组 a 中,请考生编制一函数 jsval(),其功能是:如果 4 位数各位上的数均是奇数,则统计出满足此条件的个数 cnt 并把这些 4 位数按从大到小的顺序存入数组 b 中。最后 main()函数训用写函数 writeDat()把结果 cnt 及数组 b 中符合条件的 4 位数输出到 out.dat 文件中。注意:部分源程序已经给出。程序中已定义数组 a20

2、0,b200,已定义变量:cnt。请勿改动数据文件 in.dat 中的任何数据、主函数 main()、读函数 readDat()和写函数 writeDat()的内容。试题源程序#includestdioh#define MAX 200int aMAX,KMAX,cnt=0;void writeDat();void JsVal()void teadDat()int i;FILE*fp;fp=fopen(“indat“,“r“):for(i=0;iMAX;i+)fscanf(fp,“%cr,bi=bEj;bj=k;)解析:解析 本题主要考查的是数位分解问题。本题主要考查的知识点包括:C 语言循环结构,if 判断语句和逻辑表达式,以及分解多位整数的算术运算。首先用 for 循环和变量 i 遍历数组的每个元素,对于某一元素 ai,用%和/运算将各个位数分解出来,存放到数组 ss 中,使用 for 循环和变量 j 判断数组 ss中各个数是否都是奇数,如果是则标志 flag 置为 1,有一个是偶数则置为 0 并且跳出循环,如果 flag 为1,则说明满足都是奇数的条件,将该数 at存入数组 b 中,统计变量 cnt 增 1,当所有元素遍历完后给数组 b 中的元素使用冒泡排序法进行排序。

展开阅读全文
相关资源
猜你喜欢
  • ASTM E465-2000(2005) Standard Test Methods for Determination of Manganese (IV) in Manganese Ores by Redox Titration《用氧化还原滴定法测定锰矿石中锰含量的标准试验方法》.pdf ASTM E465-2000(2005) Standard Test Methods for Determination of Manganese (IV) in Manganese Ores by Redox Titration《用氧化还原滴定法测定锰矿石中锰含量的标准试验方法》.pdf
  • ASTM E465-2011 3750 Standard Test Methods for Determination of Manganese (IV) in Manganese Ores by Redox Titrimetry《用氧化还原滴定法测定锰矿石锰(四)含量的标准试验方法》.pdf ASTM E465-2011 3750 Standard Test Methods for Determination of Manganese (IV) in Manganese Ores by Redox Titrimetry《用氧化还原滴定法测定锰矿石锰(四)含量的标准试验方法》.pdf
  • ASTM E465-2011(2017) 7500 Standard Test Methods for Determination of Manganese (IV) in Manganese Ores by Redox Titrimetry《采用氧化还原滴定法测定锰矿石锰(IV)含量的标准试验方法》.pdf ASTM E465-2011(2017) 7500 Standard Test Methods for Determination of Manganese (IV) in Manganese Ores by Redox Titrimetry《采用氧化还原滴定法测定锰矿石锰(IV)含量的标准试验方法》.pdf
  • ASTM E466-1996(2002)e1 Standard Practice for Conducting Force Controlled Constant Amplitude Axial Fatigue Tests of Metallic Materials《金属材料上进行的恒定振幅轴向疲劳试验》.pdf ASTM E466-1996(2002)e1 Standard Practice for Conducting Force Controlled Constant Amplitude Axial Fatigue Tests of Metallic Materials《金属材料上进行的恒定振幅轴向疲劳试验》.pdf
  • ASTM E466-2007 809 Standard Practice for Conducting Force Controlled Constant Amplitude Axial Fatigue Tests of Metallic Materials《金属材料受力控制的恒定振幅轴向疲劳试验的操作用标准实施规程》.pdf ASTM E466-2007 809 Standard Practice for Conducting Force Controlled Constant Amplitude Axial Fatigue Tests of Metallic Materials《金属材料受力控制的恒定振幅轴向疲劳试验的操作用标准实施规程》.pdf
  • ASTM E466-2015 red 2250 Standard Practice for Conducting Force Controlled Constant Amplitude Axial Fatigue Tests of Metallic Materials《实施金属材料力控恒定振幅轴向疲劳试验的标准实施规程》.pdf ASTM E466-2015 red 2250 Standard Practice for Conducting Force Controlled Constant Amplitude Axial Fatigue Tests of Metallic Materials《实施金属材料力控恒定振幅轴向疲劳试验的标准实施规程》.pdf
  • ASTM E467-1998a(2004) Standard Practice for Verification of Constant Amplitude Dynamic Forces in an Axial Fatigue Testing System《轴向疲劳试验系统中恒振幅动态力验证的标准实施规范》.pdf ASTM E467-1998a(2004) Standard Practice for Verification of Constant Amplitude Dynamic Forces in an Axial Fatigue Testing System《轴向疲劳试验系统中恒振幅动态力验证的标准实施规范》.pdf
  • ASTM E467-2008 402 Standard Practice for Verification of Constant Amplitude Dynamic Forces in an Axial Fatigue Testing System《轴向疲劳试验系统中恒振幅动态力验证的标准实施规范》.pdf ASTM E467-2008 402 Standard Practice for Verification of Constant Amplitude Dynamic Forces in an Axial Fatigue Testing System《轴向疲劳试验系统中恒振幅动态力验证的标准实施规范》.pdf
  • ASTM E467-2008(2014) 2157 Standard Practice for Verification of Constant Amplitude Dynamic Forces in an Axial Fatigue Testing System《轴向疲劳试验系统中恒振幅动态力验证的标准实施规程》.pdf ASTM E467-2008(2014) 2157 Standard Practice for Verification of Constant Amplitude Dynamic Forces in an Axial Fatigue Testing System《轴向疲劳试验系统中恒振幅动态力验证的标准实施规程》.pdf
  • 相关搜索

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

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