【计算机类职业资格】计算机四级机试-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)解析:

展开阅读全文
相关资源
猜你喜欢
  • IEC 60481-1974 Coupling devices for power line carrier systems《电力线载波系统的耦合装置》.pdf IEC 60481-1974 Coupling devices for power line carrier systems《电力线载波系统的耦合装置》.pdf
  • IEC 60483-1976 Guide to dynamic measurements of piezoelectric ceramics with high electromechanical coupling《高机电耦合压电陶瓷的动态测量指南》.pdf IEC 60483-1976 Guide to dynamic measurements of piezoelectric ceramics with high electromechanical coupling《高机电耦合压电陶瓷的动态测量指南》.pdf
  • IEC 60487-2-1-1981 Methods of measurement for equipment used in terrestrial radio-relay systems Part 2  Measurements for sub-systems Section One - General《地面无线电中继系统所用设备的测量方法 第2部分 分系统测量 第1节 总则》.pdf IEC 60487-2-1-1981 Methods of measurement for equipment used in terrestrial radio-relay systems Part 2 Measurements for sub-systems Section One - General《地面无线电中继系统所用设备的测量方法 第2部分 分系统测量 第1节 总则》.pdf
  • IEC 60487-3-1975 Methods of measurement for equipment used in terrestrial radio-relay systems Part 3  Simulated systems《地面无线电中继系统所用设备的测量方法 第3部分 模拟系统》.pdf IEC 60487-3-1975 Methods of measurement for equipment used in terrestrial radio-relay systems Part 3 Simulated systems《地面无线电中继系统所用设备的测量方法 第3部分 模拟系统》.pdf
  • IEC 60488-1-2004 Higher performance protocol for the standard digital interface for programmable instrumentation - Part 1 General《可编程序设备的标准数字接口高效协议.第1部分 总则》.pdf IEC 60488-1-2004 Higher performance protocol for the standard digital interface for programmable instrumentation - Part 1 General《可编程序设备的标准数字接口高效协议.第1部分 总则》.pdf
  • IEC 60488-2-2004 Standard digital interface for programmable instrumentation - Part 2 Codes formats protocols and common commands《可编程序设备的标准数字接口.第2部分 代码、格式、协议和通用命令》.pdf IEC 60488-2-2004 Standard digital interface for programmable instrumentation - Part 2 Codes formats protocols and common commands《可编程序设备的标准数字接口.第2部分 代码、格式、协议和通用命令》.pdf
  • IEC 60489-1-1983 Methods of measurement for radio equipment used in the mobile services Part 1  General definitions and standard conditions of measurement《移动业务中用的无线电设备的测量方法 第1部分 通用定义和测量的标准条件》.pdf IEC 60489-1-1983 Methods of measurement for radio equipment used in the mobile services Part 1 General definitions and standard conditions of measurement《移动业务中用的无线电设备的测量方法 第1部分 通用定义和测量的标准条件》.pdf
  • IEC 60489-2-1991 Methods of measurement for radio equipment used in the mobile services part 2 transmitters employing A3E F3E or G3E emissions《移动业务中用的无线电设备的测量方法 第2部分 采用A3E、F3E或G3E发射的发射机》.pdf IEC 60489-2-1991 Methods of measurement for radio equipment used in the mobile services part 2 transmitters employing A3E F3E or G3E emissions《移动业务中用的无线电设备的测量方法 第2部分 采用A3E、F3E或G3E发射的发射机》.pdf
  • IEC 60489-3-1988 Methods of measurement for radio equipment used in the mobile services part 3 receivers for A3E or F3E emissions《移动业务中用的无线电设备的测量方法 第3部分 对A3E或F3E发射的接收机》.pdf IEC 60489-3-1988 Methods of measurement for radio equipment used in the mobile services part 3 receivers for A3E or F3E emissions《移动业务中用的无线电设备的测量方法 第3部分 对A3E或F3E发射的接收机》.pdf
  • 相关搜索

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

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