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

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

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

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

展开阅读全文
相关资源
猜你喜欢
  • BS ISO 7876-5-2005 en_4579  Fuel injection equipment - Vocabulary - Common rail fuel injection systems《燃油喷射装置.词汇.通用轨燃油喷射系统》.pdf BS ISO 7876-5-2005 en_4579 Fuel injection equipment - Vocabulary - Common rail fuel injection systems《燃油喷射装置.词汇.通用轨燃油喷射系统》.pdf
  • BS ISO 7879-1998 en_5405  Diesel engines - Cradle mounted in-line fuel injection pumps - Mounting dimensions《柴油发动机.托架安装直列式燃料喷射泵.安装尺寸》.pdf BS ISO 7879-1998 en_5405 Diesel engines - Cradle mounted in-line fuel injection pumps - Mounting dimensions《柴油发动机.托架安装直列式燃料喷射泵.安装尺寸》.pdf
  • BS ISO 789-3-2015 en_9297  Agricultural tractors Test procedures Turning and clearance diameters《农用拖拉机 试验规程 转向圆和通过圆直径》.pdf BS ISO 789-3-2015 en_9297 Agricultural tractors Test procedures Turning and clearance diameters《农用拖拉机 试验规程 转向圆和通过圆直径》.pdf
  • BS ISO 7902-1-2013 en_5524  Hydrodynamic plain journal bearings under steady-state conditions Circular cylindrical bearings Calculation procedure《稳态条件下液压滑动轴承.圆柱形轴承.计算程序》.pdf BS ISO 7902-1-2013 en_5524 Hydrodynamic plain journal bearings under steady-state conditions Circular cylindrical bearings Calculation procedure《稳态条件下液压滑动轴承.圆柱形轴承.计算程序》.pdf
  • BS ISO 7918-1996 en_1656  Forestry machinery - Portable brush cutters and grass trimmers - Cutting attachment guard dimensions《林业机械.便携式灌木切割机和剪草器.切割附件护板尺寸》.pdf BS ISO 7918-1996 en_1656 Forestry machinery - Portable brush cutters and grass trimmers - Cutting attachment guard dimensions《林业机械.便携式灌木切割机和剪草器.切割附件护板尺寸》.pdf
  • BS ISO 7919-3-2009 en_3542  Mechanical vibration - Evaluation of machine vibration by measurements on rotating shafts - Coupled industrial machines《机械振动.通过对旋转轴的测量评估机械振动.耦合工业机械》.pdf BS ISO 7919-3-2009 en_3542 Mechanical vibration - Evaluation of machine vibration by measurements on rotating shafts - Coupled industrial machines《机械振动.通过对旋转轴的测量评估机械振动.耦合工业机械》.pdf
  • BS ISO 7967-1-2007 en_9548  Reciprocating internal combustion engines - Vocabulary of components and systems - Structure and external covers《往复式内燃机.零部件和系统词汇.结构和外部汽缸盖》.pdf BS ISO 7967-1-2007 en_9548 Reciprocating internal combustion engines - Vocabulary of components and systems - Structure and external covers《往复式内燃机.零部件和系统词汇.结构和外部汽缸盖》.pdf
  • BS ISO 7967-10-2014 en_4235  Reciprocating internal combustion engines Vocabulary of components and systems Ignition systems《往复式内燃机 零部件和系统词汇 点火系统》.pdf BS ISO 7967-10-2014 en_4235 Reciprocating internal combustion engines Vocabulary of components and systems Ignition systems《往复式内燃机 零部件和系统词汇 点火系统》.pdf
  • BS ISO 7967-11-2014 en_5324  Reciprocating internal combustion engines Vocabulary of components and systems Fuel systems《往复式内燃机 零部件和系统词汇 燃油系统》.pdf BS ISO 7967-11-2014 en_5324 Reciprocating internal combustion engines Vocabulary of components and systems Fuel systems《往复式内燃机 零部件和系统词汇 燃油系统》.pdf
  • 相关搜索

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

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