【计算机类职业资格】国家三级(网络技术)机试-试卷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 条命令的功能就是根据题目要求实现将记录从大到小的排序。

展开阅读全文
相关资源
猜你喜欢
  • ITU-T K 30 FRENCH-2004 Self-restoring overcurrent protectors《自动恢复过流保护器 系列K 干扰防护 5号研究组》.pdf ITU-T K 30 FRENCH-2004 Self-restoring overcurrent protectors《自动恢复过流保护器 系列K 干扰防护 5号研究组》.pdf
  • ITU-T K 30 SPANISH-2004 Self-restoring overcurrent protectors《自动恢复过流保护器 系列K 干扰防护 5号研究组》.pdf ITU-T K 30 SPANISH-2004 Self-restoring overcurrent protectors《自动恢复过流保护器 系列K 干扰防护 5号研究组》.pdf
  • ITU-T K 30-2004 Self-restoring overcurrent protectors SERIES K PROTECTION AGAINST INTERFERENCE (Study Group 5)《正温度系数(PTC)的热敏电阻 系列K 抗干扰防护(研究组5)》.pdf ITU-T K 30-2004 Self-restoring overcurrent protectors SERIES K PROTECTION AGAINST INTERFERENCE (Study Group 5)《正温度系数(PTC)的热敏电阻 系列K 抗干扰防护(研究组5)》.pdf
  • ITU-T K 31 FRENCH-1993 BONDING CONFIGURATIONS AND EARTHING OF TELECOMMUNICATION INSTALLATIONS INSIDE A SUBSCRIBER’S BUILDING《用户大楼内电信装置的连接结构和接地 干扰防护(5号研究组)10pp》.pdf ITU-T K 31 FRENCH-1993 BONDING CONFIGURATIONS AND EARTHING OF TELECOMMUNICATION INSTALLATIONS INSIDE A SUBSCRIBER’S BUILDING《用户大楼内电信装置的连接结构和接地 干扰防护(5号研究组)10pp》.pdf
  • ITU-T K 31 SPANISH-1993 BONDING CONFIGURATIONS AND EARTHING OF TELECOMMUNICATION INSTALLATIONS INSIDE A SUBSCRIBER’S BUILDING《用户大楼内电信装置的连接结构和接地 干扰防护(5号研究组)10pp》.pdf ITU-T K 31 SPANISH-1993 BONDING CONFIGURATIONS AND EARTHING OF TELECOMMUNICATION INSTALLATIONS INSIDE A SUBSCRIBER’S BUILDING《用户大楼内电信装置的连接结构和接地 干扰防护(5号研究组)10pp》.pdf
  • ITU-T K 31-1993 Bonding Configurations and Earthing of Telecommunication Installations Inside a Subscriber-s Building - Protection Against Interference (Study Group V) 10 pp《用户大楼内电.pdf ITU-T K 31-1993 Bonding Configurations and Earthing of Telecommunication Installations Inside a Subscriber-s Building - Protection Against Interference (Study Group V) 10 pp《用户大楼内电.pdf
  • ITU-T K 33 FRENCH-1996 Limits for people safety related to coupling into telecommunications system from a c electric power and a c electrified railway installations in fault condit.pdf ITU-T K 33 FRENCH-1996 Limits for people safety related to coupling into telecommunications system from a c electric power and a c electrified railway installations in fault condit.pdf
  • ITU-T K 33 SPANISH-1996 Limits for people safety related to coupling into telecommunications system from a c electric power and a c electrified railway installations in fault condi.pdf ITU-T K 33 SPANISH-1996 Limits for people safety related to coupling into telecommunications system from a c electric power and a c electrified railway installations in fault condi.pdf
  • ITU-T K 33-1996 Limits for People Safety Related to Coupling into Telecommunications System form A C Electric Power and A C Electrified Railway Installations in Fault Conditions - dy .pdf ITU-T K 33-1996 Limits for People Safety Related to Coupling into Telecommunications System form A C Electric Power and A C Electrified Railway Installations in Fault Conditions - dy .pdf
  • 相关搜索

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

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