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

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

1、计算机三级数据库技术(上机操作)机试模拟试卷 34及答案与解析 一、程序设计题 1 函数 readDat()从数据文件 in dat中读取 20行数据并存放到字符串数组 xx中 (每行字符串长度均小于 80)。请编写函数 jsSort(),其函数的功能是:以行为单位对字符串按下面给定的条件进行排序,排序后的结果仍按行重新存入字符串数组 xx中。最后调用函数 writeDat()把结果 XX输 m到文件 out dat中。条件:从字符串中间一分为二,左边部分按字符的 ASCII码值升序排序右边部分不变。左边经排序后再与右边部分进 行交换。如果原字符串长度为奇数。则最中间的字符不参加处理,字符仍放

2、在原位置上。 例如:位置 0 1 2 3 4 5 6 7 8 原字符串 d C b a h g f e 4 3 2 1 9 8 7 6 5 则处理后字符串 h g f e a h C d R 7 6 5 9 1 2 3 4 【试题程序】 #include #include char xxEZ03 E803; void readDat(); void writeDat(); void jsSort() *第 i行文章的内容已作为字符串存入 xxl-i为起始地址的存储单元内 * *提示:先对字符串左边部分的字符数组进行升序排序。左边部分字符数组对应的下标从 0到 strlen(xxEi) 21。 * *该提示仅供解题参考,考生也可用其他方法解题 * ) void main() readDat(); jsSort(); writeDat(); void readDat() FILE*in; int i=0; char*P; in=fopen(“in dat”。 r); while(ixxEik) temp=xxij; xxriqj=xxik; xxik=temp; for(j=0;jstrlen(xxi) 2; j+) *交换字符 * k=j+(strlen(xxi)+1) 2; temp=xxij1; xxij=xxik; xxik=temp;

展开阅读全文
相关资源
猜你喜欢
  • AECMA PREN 4618-2004 Aerospace series Aircraft internal air quality standards criteria and determination methods Edition P 1《航空航天系列.航行器内部空气质量标准和决定方法.P1版》.pdf AECMA PREN 4618-2004 Aerospace series Aircraft internal air quality standards criteria and determination methods Edition P 1《航空航天系列.航行器内部空气质量标准和决定方法.P1版》.pdf
  • AECMA PREN 4619-2008 Aerospace series Inserts MJ threads self-locking with self-broaching keys Installation and removal procedure Edition P 1《带MJ螺纹及自动拉削键的自锁式航空航天系列插件的安装及拆卸规程 P1版》.pdf AECMA PREN 4619-2008 Aerospace series Inserts MJ threads self-locking with self-broaching keys Installation and removal procedure Edition P 1《带MJ螺纹及自动拉削键的自锁式航空航天系列插件的安装及拆卸规程 P1版》.pdf
  • AECMA PREN 4620-2008 Aerospace series Inserts MJ threads self-locking with self-broaching keys Design standard Edition P 1《航空航天系列插件 自锁 自削钥匙设计标准MJ螺纹 第P1版》.pdf AECMA PREN 4620-2008 Aerospace series Inserts MJ threads self-locking with self-broaching keys Design standard Edition P 1《航空航天系列插件 自锁 自削钥匙设计标准MJ螺纹 第P1版》.pdf
  • AECMA PREN 4621-2008 Aerospace series Inserts MJ threads self-locking with self-broaching keys Technical specification Edition P 1《带MJ螺纹及自动拉削键的自锁式航空航天系列插件机的安装及拆卸规程 P1版》.pdf AECMA PREN 4621-2008 Aerospace series Inserts MJ threads self-locking with self-broaching keys Technical specification Edition P 1《带MJ螺纹及自动拉削键的自锁式航空航天系列插件机的安装及拆卸规程 P1版》.pdf
  • AECMA PREN 4622-2008 Aerospace series Inserts MJ threads self-locking with self-broaching keys in heat resisting steel FE-PA2601 (A286) MoS2 coated Edition P 1《航空航天系列插件 耐热钢FE-PA260.pdf AECMA PREN 4622-2008 Aerospace series Inserts MJ threads self-locking with self-broaching keys in heat resisting steel FE-PA2601 (A286) MoS2 coated Edition P 1《航空航天系列插件 耐热钢FE-PA260.pdf
  • AECMA PREN 4623-2008 Aerospace series Inserts MJ threads self-locking with self-broaching keys in heat resisting nickel base alloy NI-PH2601 (Inconel 718) silver plated Edition P 1.pdf AECMA PREN 4623-2008 Aerospace series Inserts MJ threads self-locking with self-broaching keys in heat resisting nickel base alloy NI-PH2601 (Inconel 718) silver plated Edition P 1.pdf
  • AECMA PREN 4624-2008 Aerospace series Inserts MJ threads self-locking with self-broaching keys in heat resisting nickel base alloy NI-PH1302 (Waspaloy) silver plated Edition P 1《航空.pdf AECMA PREN 4624-2008 Aerospace series Inserts MJ threads self-locking with self-broaching keys in heat resisting nickel base alloy NI-PH1302 (Waspaloy) silver plated Edition P 1《航空.pdf
  • AECMA PREN 4626-001-2006 Aerospace series Connectors optical rectangular multicontact rack and panel Quadrax cavity 2 5 mm diameter ferrule Operating temperatures - 65 Degrees C toP.pdf AECMA PREN 4626-001-2006 Aerospace series Connectors optical rectangular multicontact rack and panel Quadrax cavity 2 5 mm diameter ferrule Operating temperatures - 65 Degrees C toP.pdf
  • AECMA PREN 4626-002-2006 Aerospace series Connectors optical rectangular multicontact rack and panel Quadrax cavity 2 5 mm diameter ferrule Operating temperatures - 65 Degrees C toP.pdf AECMA PREN 4626-002-2006 Aerospace series Connectors optical rectangular multicontact rack and panel Quadrax cavity 2 5 mm diameter ferrule Operating temperatures - 65 Degrees C toP.pdf
  • 相关搜索

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

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