【计算机类职业资格】国家三级(网络技术)机试-试卷72及答案解析.doc

上传人:amazingpat195 文档编号:1331112 上传时间:2019-10-17 格式:DOC 页数:2 大小:30KB
下载 相关 举报
【计算机类职业资格】国家三级(网络技术)机试-试卷72及答案解析.doc_第1页
第1页 / 共2页
【计算机类职业资格】国家三级(网络技术)机试-试卷72及答案解析.doc_第2页
第2页 / 共2页
亲,该文档总共2页,全部预览完了,如果喜欢就下载吧!
资源描述

1、国家三级(网络技术)机试-试卷 72 及答案解析(总分:2.00,做题时间:90 分钟)一、程序设计题(总题数:1,分数:2.00)1. (分数:2.00)_国家三级(网络技术)机试-试卷 72 答案解析(总分:2.00,做题时间:90 分钟)一、程序设计题(总题数:1,分数:2.00)1. (分数:2.00)_正确答案:(正确答案: )解析:解析:首先定义两个循环变量 i、j;一个用来保存结构体变量长度的计算结果的变量 len;一个用于中间转换数据的结构体变量 tmp。 计算结构体变量长度,并按结构体变量 tmp 分配 len 大小的内存空间。 建立两个 for 循环,指定第一个 for 循

2、环的循环变量 i 从 0 开始,到 100 时结束,每循环一次,变量 i 的值加 1;第 2 个 for 循环的循环变量 j 从 i+1 开始,即从当前行的下一行开始,到 100 时结束,每循环一次,变量 j 的值加 1。 在循环体中指定排序的条件,分两个步骤指定,第一步通过strcmp()函数判断第 i 行的产品代码与其后面各行中产品代码的大小关系;第二步,如果比较的两行中产品代码 相同的话,则再比较金额的大小。当第 i 行的产品代码小于后面比较行的产品代码,又或者产品代码相同时,第 i 行的金额小于后面比较行的金额时,将执行 if 条件语句后面花括号中的命令,花括号中 3 条命令的功能就是根据题目要求实现将记录从大到小的排序。

展开阅读全文
相关资源
猜你喜欢
  • ASTM G106-1989(2004) Standard Practice for Verification of Algorithm and Equipment for Electrochemical Impedance Measurements《电化学阻抗测量用算法和设备的验证》.pdf ASTM G106-1989(2004) Standard Practice for Verification of Algorithm and Equipment for Electrochemical Impedance Measurements《电化学阻抗测量用算法和设备的验证》.pdf
  • ASTM G106-1989(2010) Standard Practice for Verification of Algorithm and Equipment for Electrochemical Impedance Measurements《电化学阻抗测量用算法和设备的验证标准实施规程》.pdf ASTM G106-1989(2010) Standard Practice for Verification of Algorithm and Equipment for Electrochemical Impedance Measurements《电化学阻抗测量用算法和设备的验证标准实施规程》.pdf
  • ASTM G106-1989(2015) Standard Practice for Verification of Algorithm and Equipment for Electrochemical Impedance Measurements《电化学阻抗测量用算法和设备验证的标准实施规程》.pdf ASTM G106-1989(2015) Standard Practice for Verification of Algorithm and Equipment for Electrochemical Impedance Measurements《电化学阻抗测量用算法和设备验证的标准实施规程》.pdf
  • ASTM G107-1995(2002) Standard Guide for Formats for Collection and Compilation of Corrosion Data for Metals for Computerized Database Input《计算机化数据库输入用金属腐蚀数据的采集和编辑格式》.pdf ASTM G107-1995(2002) Standard Guide for Formats for Collection and Compilation of Corrosion Data for Metals for Computerized Database Input《计算机化数据库输入用金属腐蚀数据的采集和编辑格式》.pdf
  • ASTM G107-1995(2008) Standard Guide for Formats for Collection and Compilation of Corrosion Data for Metals for Computerized Database Input《计算机化数据库输入用金属腐蚀数据的采集和编辑格式的标准指南》.pdf ASTM G107-1995(2008) Standard Guide for Formats for Collection and Compilation of Corrosion Data for Metals for Computerized Database Input《计算机化数据库输入用金属腐蚀数据的采集和编辑格式的标准指南》.pdf
  • ASTM G107-1995(2015) Standard Guide for Formats for Collection and Compilation of Corrosion Data for Metals for Computerized Database Input《用于计算机数据库输入的金属腐蚀数据收集和汇编格式的标准指南》.pdf ASTM G107-1995(2015) Standard Guide for Formats for Collection and Compilation of Corrosion Data for Metals for Computerized Database Input《用于计算机数据库输入的金属腐蚀数据收集和汇编格式的标准指南》.pdf
  • ASTM G108-1994(2004)e1 Standard Test Method for Electrochemical Reactivation (EPR) for Detecting Sensitization of AISI Type 304 and 304L Stainless Steels《检测AISI304和304L型不锈钢增感作用的电化学.pdf ASTM G108-1994(2004)e1 Standard Test Method for Electrochemical Reactivation (EPR) for Detecting Sensitization of AISI Type 304 and 304L Stainless Steels《检测AISI304和304L型不锈钢增感作用的电化学.pdf
  • ASTM G108-1994(2010) Standard Test Method for Electrochemical Reactivation (EPR) for Detecting Sensitization of AISI Type 304 and 304L Stainless Steels《检测AISI304和304L型不锈钢增感作用的电化学再活.pdf ASTM G108-1994(2010) Standard Test Method for Electrochemical Reactivation (EPR) for Detecting Sensitization of AISI Type 304 and 304L Stainless Steels《检测AISI304和304L型不锈钢增感作用的电化学再活.pdf
  • ASTM G108-1994(2015) Standard Test Method for Electrochemical Reactivation (EPR) for Detecting Sensitization of AISI Type 304 and 304L Stainless Steels《检测AISI304和304L型不锈钢增感作用的电化学再活.pdf ASTM G108-1994(2015) Standard Test Method for Electrochemical Reactivation (EPR) for Detecting Sensitization of AISI Type 304 and 304L Stainless Steels《检测AISI304和304L型不锈钢增感作用的电化学再活.pdf
  • 相关搜索

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

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