[计算机类试卷]计算机三级网络技术机试(上机操作)模拟试卷92及答案与解析.doc

上传人:orderah291 文档编号:505758 上传时间:2018-11-29 格式:DOC 页数:4 大小:27.50KB
下载 相关 举报
[计算机类试卷]计算机三级网络技术机试(上机操作)模拟试卷92及答案与解析.doc_第1页
第1页 / 共4页
[计算机类试卷]计算机三级网络技术机试(上机操作)模拟试卷92及答案与解析.doc_第2页
第2页 / 共4页
[计算机类试卷]计算机三级网络技术机试(上机操作)模拟试卷92及答案与解析.doc_第3页
第3页 / 共4页
[计算机类试卷]计算机三级网络技术机试(上机操作)模拟试卷92及答案与解析.doc_第4页
第4页 / 共4页
亲,该文档总共4页,全部预览完了,如果喜欢就下载吧!
资源描述

1、计算机三级网络技术机试(上机操作)模拟试卷 92及答案与解析 一、程序设计题 1 文件 IN DAT中存有 200个四位整型数,函数 ReadData()负责将 IN DAT中的数读到数组 inBuf中。请编写函数 findValue(),其功能是:求出千位数上的数减百位数上的数减十位数上的数减个位数上的数大于零的数,按照从小到大的顺序存人数组 outBuf中,并用 count记录下符合条件的数的个数。函数 WriteData()负责将 outBuf中的数输出到文件 OUT DAT中并且在屏幕上显示出来。 注意:部分源程序已给出。 程序中已定义数组: inBufNUM, outBufNUM,已

2、定义变量: count。 请勿改动主函数 main()、读函数 ReadData()和写函数 WriteData()的内容。 试题程序: #include #define NUM 200 int inBufNUM, outBufNUM, count=0; void ReadData(); void WriteData(); void findValue() void main() int i; ReadData(); findValue(); WriteData(); printf(“count= d n”, coun1); for(i=0; i0) outBufcount=inBufi; c

3、ount+; for(i=0; ioutBufj) *如果第 i位比它后面的数大,则将两者进 行交换,也即将更小的值放到第 i位 * temp=outBufi; omBufi=outBufj; outBufj=temp; 【试题解析】 本题主要考查数位分解及排序。 数位分解就是将 n位数上各个数位上的数值单独分离出来。解决此问题的方法是;将 n位数对 10求余可以将个位上 的数值分离出来。将这个 n位教除以 10以后得到一个 n-1位数,则此时 n位数原来的十位就变成了 n-1位数的个位再将此n-1位数对 10求余便可得到原 n位数的十位。依此类推,按照同样的方法便可将n位数各个数位上的数值分离出来。 程序步骤: 将数值送入 temp中。 由 temp 10得到个位教 f(temp 10) 10得到十位数 如此可得到各位上的数值。 按照题目所给的条件选出数据。 对选出的数据进行排序,排序的思想是 (以从小到大为例 ):将当前数据与其后的各个数据相比较,如果当前的数据比其后的教据大,则将两 数据进行交换。从而使得前面的数据小于后面的数据,达到从小到大排序的目的。

展开阅读全文
相关资源
猜你喜欢
  • STAS 13141-1993 Finished leather Determination of colour resistance to ultraviolet radiation《成品革 测定颜色的抵抗紫外线辐射 》.pdf STAS 13141-1993 Finished leather Determination of colour resistance to ultraviolet radiation《成品革 测定颜色的抵抗紫外线辐射 》.pdf
  • STAS 13149-1984 Building physics Moderate thermal environments Determination of the PMV and PPD indices and performance levels for environments《建筑物理学 中等热环境 PMV和PPD指数及环境水平性能的测定》.pdf STAS 13149-1984 Building physics Moderate thermal environments Determination of the PMV and PPD indices and performance levels for environments《建筑物理学 中等热环境 PMV和PPD指数及环境水平性能的测定》.pdf
  • STAS CEI 107-1-1977 Recommended methods of measurement on receivers for television broadcast transmissions Part 1 General considerations Electrical measurements other than those at.pdf STAS CEI 107-1-1977 Recommended methods of measurement on receivers for television broadcast transmissions Part 1 General considerations Electrical measurements other than those at.pdf
  • STAS CEI 394-1-1992 Varnished fabrics for electrical purposes Part 1 Definitions and general requirements《电器用途的浸渍面料 第1部分:定义与一般要求 》.pdf STAS CEI 394-1-1992 Varnished fabrics for electrical purposes Part 1 Definitions and general requirements《电器用途的浸渍面料 第1部分:定义与一般要求 》.pdf
  • STAS CEI 394-2-1992 Varnished fabrics for electrical purposes Part 2 Methods of test《电器用途的浸渍面料 第2部分:测试方法》.pdf STAS CEI 394-2-1992 Varnished fabrics for electrical purposes Part 2 Methods of test《电器用途的浸渍面料 第2部分:测试方法》.pdf
  • STAS CEI 549-1992 High-voltage fuses for the external protection of shut power capacitors《并联电容器的外部保护用高压保险丝 》.pdf STAS CEI 549-1992 High-voltage fuses for the external protection of shut power capacitors《并联电容器的外部保护用高压保险丝 》.pdf
  • STAS CEI 574-2-1992 Audio-visual video and television equipment and systems Part 2 Explanation of general terms《视听,视频和电视设备和系统 第2部分:一般条款解释 》.pdf STAS CEI 574-2-1992 Audio-visual video and television equipment and systems Part 2 Explanation of general terms《视听,视频和电视设备和系统 第2部分:一般条款解释 》.pdf
  • STAS CEI 598-2-6-1992 Luminaires Part 2 Particular requirements Section 6 Luminaires with built-in transformerp for filament lamps《灯具 第2部分:特殊要求 第6章:带有白炽灯内置变压器的灯具 》.pdf STAS CEI 598-2-6-1992 Luminaires Part 2 Particular requirements Section 6 Luminaires with built-in transformerp for filament lamps《灯具 第2部分:特殊要求 第6章:带有白炽灯内置变压器的灯具 》.pdf
  • STAS CEI 721-1-1992 Clasification of environmental conditions Part 1 Environmental parameters and their severities《环境条件的分类 第1部分:环境参数及其严重程度》.pdf STAS CEI 721-1-1992 Clasification of environmental conditions Part 1 Environmental parameters and their severities《环境条件的分类 第1部分:环境参数及其严重程度》.pdf
  • 相关搜索

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

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