【计算机类职业资格】计算机四级机试-1-1及答案解析.doc

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

1、计算机四级机试-1-1 及答案解析(总分:100.00,做题时间:90 分钟)一、上机题(总题数:1,分数:100.00)1.已知数据文件 in. dat 中存有 10 组每组 20 个四位数的数据,每个数据间用空格分隔,调用读函数ReadDat()把这 10 组数据存人数组 aa 中(其中,aa 定义为 int aa 1020)。请编制一函数 jsVal(),其功能是:首先将每组 20 个数按从小到大的顺序进行排序,排序后的结果仍存人数组 aa 中,接着去掉每组中最中间的两个数以及最小的两个数,然后计算其余 16 个数的算术平均值,并将计算结果按组的顺序依次存人数组 bb 中(其中,数组 b

2、b 定义为 float bb10),最后调用写函数 WriteDat()把结果 bb 输出到文件 out.dat 中。注意:部分源程序已给出。程序中已定义全局变量:aa1020、bb10。请勿改动数据文件 in. dat 中的任何数据、主函数 main()、读函数 ReadDat()和写函数 WriteDat()的内容。试题程序# include int aa1020;float bb10;void jsVal()void ReadDat()int i,j;FILE * fp;fp=fopen(“in, dat“,“r“);for(i=0; ifor(j=0 dfclose(fp);void main()int i;ReadDat(); /*读数据*/jsVal(); / *按要求计算* /for(i=0;iprinff(“%6.21f/n“, bbi)WriteDat(); / *输出结果到文件* /WriteDat()FILE * fp;int i;fp=fopen(“out, dat“,“w“);for(i=0; iaaik+1) t=aaik; aaik=aaik+1; aaik+1=t;bbi=(sum-aai0-aai1-aaii9-aai10)/16;sum=0)解析:

展开阅读全文
相关资源
猜你喜欢
  • DIN EN ISO 24444-2011 Cosmetics - Sun protection test methods - In vivo determination of the sun protection factor (SPF) (ISO 24444 2010) German version EN ISO 24444 2010《化妆品 防晒试验方.pdf DIN EN ISO 24444-2011 Cosmetics - Sun protection test methods - In vivo determination of the sun protection factor (SPF) (ISO 24444 2010) German version EN ISO 24444 2010《化妆品 防晒试验方.pdf
  • DIN EN ISO 24450-2006 Laboratory glassware - Wide-necked boiling flasks (ISO 24450 2005) English version of DIN EN ISO 24450 2006-02《实验室玻璃器皿 广口长颈烧瓶(ISO 24450-2005) 德文版本 EN ISO 2445.pdf DIN EN ISO 24450-2006 Laboratory glassware - Wide-necked boiling flasks (ISO 24450 2005) English version of DIN EN ISO 24450 2006-02《实验室玻璃器皿 广口长颈烧瓶(ISO 24450-2005) 德文版本 EN ISO 2445.pdf
  • DIN EN ISO 24490-2016 Cryogenic vessels - Pumps for cryogenic service (ISO 24490 2016) German version EN ISO 24490 2016《低温容器 低温设备用泵(ISO 24490-2016) 德文版本EN ISO 24490-2016》.pdf DIN EN ISO 24490-2016 Cryogenic vessels - Pumps for cryogenic service (ISO 24490 2016) German version EN ISO 24490 2016《低温容器 低温设备用泵(ISO 24490-2016) 德文版本EN ISO 24490-2016》.pdf
  • DIN EN ISO 24500-2011 Ergonomics - Accessible design - Auditory signals for consumer products (ISO 24500 2010) German version EN ISO 24500 2010《人类工效学 无障碍设计 消费品用听觉信号(ISO 24500-2010).pdf DIN EN ISO 24500-2011 Ergonomics - Accessible design - Auditory signals for consumer products (ISO 24500 2010) German version EN ISO 24500 2010《人类工效学 无障碍设计 消费品用听觉信号(ISO 24500-2010).pdf
  • DIN EN ISO 24501-2011 Ergonomics - Accessible design - Sound pressure levels of auditory signals for consumer products (ISO 24501 2010) German version EN ISO 24501 2010《人类工效学 无障碍设计.pdf DIN EN ISO 24501-2011 Ergonomics - Accessible design - Sound pressure levels of auditory signals for consumer products (ISO 24501 2010) German version EN ISO 24501 2010《人类工效学 无障碍设计.pdf
  • DIN EN ISO 24502-2011 Ergonomics - Accessible design - Specification of age-related luminance contrast for coloured light (ISO 24502 2010) German version EN ISO 24502 2010《人体工效学 无障.pdf DIN EN ISO 24502-2011 Ergonomics - Accessible design - Specification of age-related luminance contrast for coloured light (ISO 24502 2010) German version EN ISO 24502 2010《人体工效学 无障.pdf
  • DIN EN ISO 24503-2011 Ergonomics - Accessible design - Tactile dots and bars on consumer products (ISO 24503 2011) German version EN ISO 24503 2011《人类工效学 易接近设计 消费品上的触点和触棒(ISO 24503.pdf DIN EN ISO 24503-2011 Ergonomics - Accessible design - Tactile dots and bars on consumer products (ISO 24503 2011) German version EN ISO 24503 2011《人类工效学 易接近设计 消费品上的触点和触棒(ISO 24503.pdf
  • DIN EN ISO 24504-2016 Ergonomics - Accessible design - Sound pressure levels of spoken announcements for products and public address systems (ISO 24504 2014) German version EN ISO .pdf DIN EN ISO 24504-2016 Ergonomics - Accessible design - Sound pressure levels of spoken announcements for products and public address systems (ISO 24504 2014) German version EN ISO .pdf
  • DIN EN ISO 24534-1-2011 Automatic vehicle and equipment identification - Electronic Registration Identification (ERI) for vehicles - Part 1 Architecture (ISO 24534-1 2010) English .pdf DIN EN ISO 24534-1-2011 Automatic vehicle and equipment identification - Electronic Registration Identification (ERI) for vehicles - Part 1 Architecture (ISO 24534-1 2010) English .pdf
  • 相关搜索

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

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