[计算机类试卷]计算机三级数据库技术(上机操作)机试模拟试卷69及答案与解析.doc

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

1、计算机三级数据库技术(上机操作)机试模拟试卷 69及答案与解析 一、程序设计题 1 已知在数据文件 in dat中存有 100个产品销售记录,每个产品销售记录由产品代码 dm(字符型 4位 )、产品名称 mc(字符型 10位 )、单价 dj(整型 )、数量 sl(整型 )、金额 je(长整型 )五部分组成。其中:金额由公式金额 =单价 *数量计算得出。函数 ReadDat()读取这 100个销售记录并存入结构体数组 sell中。请编写函数SortDat(),其功能是:按金额从小到大进行排列。若金额相等,则按产品代码从大到小进行排列最终排列 结果仍存入结构体数组 sell中。最后通过 main(

2、)函数调用函数 WriteDat(),把结果输出到文件 out dat中。 【试题程序】 #include #include #include #define MAX 100 typedef struct char dm5; *产品代码 * char mc11; *产品名称 * int dj; *单价 * int sl; *数量 * long je; *金额 * PR(); PRO sellMAX; void ReadDat(); void WriteDat(); void SortDat() void main() memset(sell 0, sizeof(sell); ReadDat(); SortDat(); WriteDat(); void ReadDat() FILE*fp; char str80, ch11; int i; fp=fopen(“in dat” “r”): for(i=0; isellj je selli je= selli je strcmp(selli dm, selli din)0) *判断条件 * temp: selli; selli=sellj; seni=temp

展开阅读全文
相关资源
猜你喜欢
  • AECMA PREN 3745-503-2000 Aerospace Series Fibres and Cables Optical Aircraft Use Test Methods Part 503 Scrape Abrasion Edition P 1《航空航空航天系列  航空用光缆和光纤 试验方法.第503部分 磨擦磨损》.pdf AECMA PREN 3745-503-2000 Aerospace Series Fibres and Cables Optical Aircraft Use Test Methods Part 503 Scrape Abrasion Edition P 1《航空航空航天系列  航空用光缆和光纤 试验方法.第503部分 磨擦磨损》.pdf
  • AECMA PREN 3745-504-1998 Aerospace Series Fibres and Cables Optical Aircraft Use Test Methods Part 504 Micro Bending Test Edition P 1《航空航空航天系列  航空用光缆和光纤 试验方法.第504部分 微弯曲试验》.pdf AECMA PREN 3745-504-1998 Aerospace Series Fibres and Cables Optical Aircraft Use Test Methods Part 504 Micro Bending Test Edition P 1《航空航空航天系列  航空用光缆和光纤 试验方法.第504部分 微弯曲试验》.pdf
  • AECMA PREN 3745-505-2006 Aerospace series Fibres and cables optical aircraft use Test methods Part 505 Cable tensile strength Edition P 1《航空航空航天系列  航空用光缆和光纤 试验方法.第505部分 电缆抗拉强度》.pdf AECMA PREN 3745-505-2006 Aerospace series Fibres and cables optical aircraft use Test methods Part 505 Cable tensile strength Edition P 1《航空航空航天系列  航空用光缆和光纤 试验方法.第505部分 电缆抗拉强度》.pdf
  • AECMA PREN 3745-506-2000 Aerospace Series Fibres and Cables Optical Aircraft Use Test Methods Part 506 Impact Resistance Edition P 1《航空航空航天系列  航空用光缆和光纤 试验方法.第506部分 抗撞击性》.pdf AECMA PREN 3745-506-2000 Aerospace Series Fibres and Cables Optical Aircraft Use Test Methods Part 506 Impact Resistance Edition P 1《航空航空航天系列  航空用光缆和光纤 试验方法.第506部分 抗撞击性》.pdf
  • AECMA PREN 3745-507-1996 Aerospace Series Fibres and Cables Optical Aircraft Use Test Methods Part 507  Cut-Through Edition P 1《航空航空航天系列  航空用光缆和光纤 试验方法.第507部分 截止透过》.pdf AECMA PREN 3745-507-1996 Aerospace Series Fibres and Cables Optical Aircraft Use Test Methods Part 507 Cut-Through Edition P 1《航空航空航天系列  航空用光缆和光纤 试验方法.第507部分 截止透过》.pdf
  • AECMA PREN 3745-508-1997 Aerospace Series Fibres and Cables Optical Aircraft Use Test Methods Part 508  Torsion Edition P 2《航空航空航天系列  航空用光缆和光纤 试验方法.第508部分 扭力版》.pdf AECMA PREN 3745-508-1997 Aerospace Series Fibres and Cables Optical Aircraft Use Test Methods Part 508 Torsion Edition P 2《航空航空航天系列  航空用光缆和光纤 试验方法.第508部分 扭力版》.pdf
  • AECMA PREN 3745-509-1996 Aerospace Series Fibres and Cables Optical Aircraft Use Test Methods Part 509  Kink Test Edition P 1《航空航空航天系列  航空用光缆和光纤 试验方法.第509部分 卷缩测试》.pdf AECMA PREN 3745-509-1996 Aerospace Series Fibres and Cables Optical Aircraft Use Test Methods Part 509 Kink Test Edition P 1《航空航空航天系列  航空用光缆和光纤 试验方法.第509部分 卷缩测试》.pdf
  • AECMA PREN 3745-510-1996 Aerospace Series Fibres and Cables Optical Aircraft Use Test Methods Part 510  Bending Test Edition P 1《航空航空航天系列  航空用光缆和光纤 试验方法.第510部分 弯曲测试》.pdf AECMA PREN 3745-510-1996 Aerospace Series Fibres and Cables Optical Aircraft Use Test Methods Part 510 Bending Test Edition P 1《航空航空航天系列  航空用光缆和光纤 试验方法.第510部分 弯曲测试》.pdf
  • AECMA PREN 3745-511-1997 Aerospace Series Fibres and Cables Optical Aircraft Use Test Methods Part 511 Cable to Cable Abrasion Edition P 1《航空航空航天系列  航空用光缆和光纤 试验方法.第511部分 有线电视电缆磨损》.pdf AECMA PREN 3745-511-1997 Aerospace Series Fibres and Cables Optical Aircraft Use Test Methods Part 511 Cable to Cable Abrasion Edition P 1《航空航空航天系列  航空用光缆和光纤 试验方法.第511部分 有线电视电缆磨损》.pdf
  • 相关搜索

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

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