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

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

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

2、ain()函数调用函数 WriteDat(),把结果输出到文件 out dat中。 【试题程序】 #include #include #include #define MAX 100 typedef struct char amES; *产品代码 * char mc11; *产品名称 * int d; *单价 * int sl; *数量 * long je; *金额 * PR0; 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; i selli je) *判断条件 * temp=selli; selli=sellj; sellj=tempt

展开阅读全文
相关资源
猜你喜欢
  • ASA S2 72 PART 1-2002 American National Standard Mechanical vibration and shock C Evaluation of human exposure to whole-body vibration C Part 1 General requirements - Nationally Ad.pdf ASA S2 72 PART 1-2002 American National Standard Mechanical vibration and shock C Evaluation of human exposure to whole-body vibration C Part 1 General requirements - Nationally Ad.pdf
  • ASA S2 72 PART 4 AMD 1-2010 American National Standard Mechanical vibration and shock C Evaluation of human exposure to whole-body vibration C Part 4 Guidelines for the evaluation .pdf ASA S2 72 PART 4 AMD 1-2010 American National Standard Mechanical vibration and shock C Evaluation of human exposure to whole-body vibration C Part 4 Guidelines for the evaluation .pdf
  • ASA S2 72 PART 4-2003 American National Standard Mechanical Vibration and Shock C Evaluation of Human Exposure to Whole Body Vibration C Part 4 Guidelines for the Evaluation of the.pdf ASA S2 72 PART 4-2003 American National Standard Mechanical Vibration and Shock C Evaluation of Human Exposure to Whole Body Vibration C Part 4 Guidelines for the Evaluation of the.pdf
  • ASA S2 73-2014 American National Standard Mechanical Vibration and Shock C Hand-arm Vibration C Measurement and Evaluation of the Vibration Transmissibility of Gloves at the Palm o.pdf ASA S2 73-2014 American National Standard Mechanical Vibration and Shock C Hand-arm Vibration C Measurement and Evaluation of the Vibration Transmissibility of Gloves at the Palm o.pdf
  • ASA S2 73-2014 American National Standard Mechanical Vibration and Shock C Hand-arm Vibration C Measurement and Evaluation of the Vibration Transmissibility of Gloves at the Palm ot.pdf ASA S2 73-2014 American National Standard Mechanical Vibration and Shock C Hand-arm Vibration C Measurement and Evaluation of the Vibration Transmissibility of Gloves at the Palm ot.pdf
  • ASA S2 75 PART 1-2017 AMERICAN NATIONAL STANDARD Shaft Alignment Methodology Part 1 General Principles Methods Practices and Tolerances.pdf ASA S2 75 PART 1-2017 AMERICAN NATIONAL STANDARD Shaft Alignment Methodology Part 1 General Principles Methods Practices and Tolerances.pdf
  • ASA S2 75 PART 2-2017 American National Standard Shaft Alignment Methodology Part 2 Vocabulary.pdf ASA S2 75 PART 2-2017 American National Standard Shaft Alignment Methodology Part 2 Vocabulary.pdf
  • ASA S2 8-2007 American National Standard Technical Information Used for Resilient Mounting Applications (Includes Erratum)《弹性机垫应用技术信息合并勘误表2007》.pdf ASA S2 8-2007 American National Standard Technical Information Used for Resilient Mounting Applications (Includes Erratum)《弹性机垫应用技术信息合并勘误表2007》.pdf
  • ASA S2 9-2008 American National Standard Parameters for Specifying Damping Properties of Materials and System Damping《系统缓冲和材料冲击性能详细说明参数》.pdf ASA S2 9-2008 American National Standard Parameters for Specifying Damping Properties of Materials and System Damping《系统缓冲和材料冲击性能详细说明参数》.pdf
  • 相关搜索

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

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