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

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

1、计算机三级数据库技术(上机操作)机试模拟试卷 86及答案与解析 一、程序设计题 1 函数 ReadDatt()实现从文件 in dat中读取一篇英文文章并存入到字符串数组 XX中;请编写函数 encryptChar(),按给定的替代关系对数组 XX中的所有字符进行替代,然后存人数组 xx对应的位置上,最后调用函数 WriteDat()把结果数组 xx输出到文件 out dat中。替代关系是: f(p)=P*11 mod 256, mod为取余运算。 P是数组xx中某一个字符的 ASCII码值, f(p)是计算后的无符号整型值 (注意 :中间变量定义成整型变量 ),如果计算后 f(p)值小于等于

2、 32或 f(p)的值在 65至 90范围内 (包括65和 90),则原字符不变,否则用 f(p)替代所对应的字符。 【试题程序】 #include #include #include unsigned char xxES03 1-803; int maxline=0; *文章的总行数 * int ReadDat(void); void WriteDat(void); void encryptChar() *第 i行文章的内容已作为字符串存入 xxi为起始地址的存储单元内 * *请使用中间变量来存放替代关系处理后的值 val* *例如: val=xxEdEj*11 256; * *该提示仅供解

3、题参考,考生也可用其他方法解题 * void main() if(ReadDat() printf(“数据文件 IN DAT不能打开 ! n 007”); return; eneryptChar(); WriteDat(), int ReadDaftvoid) FILE*fp; int i=0; unsigned char*P; if(fp=fopen(”in dat“, ”r”)=NULL) return 1; while(fgets(xxi, 80, fp)!=NULL) p=strchr(xx-i, n); if(p)*p=0; i+: maxline=i; fclose(fp); return 0; void WriteDat(void) FILE*fp; int i; fp=fopen(“out dat”。 “W”); for(i=0;i=65

展开阅读全文
相关资源
猜你喜欢
  • BS ISO IEC 33001-2015 Information technology Process assessment Concepts and terminology《信息技术 过程评定 概念和术语》.pdf BS ISO IEC 33001-2015 Information technology Process assessment Concepts and terminology《信息技术 过程评定 概念和术语》.pdf
  • BS ISO IEC 33002-2015 Information technology Process assessment Requirements for performing process assessment《信息技术 过程评定 过程评定的实施要求》.pdf BS ISO IEC 33002-2015 Information technology Process assessment Requirements for performing process assessment《信息技术 过程评定 过程评定的实施要求》.pdf
  • BS ISO IEC 33003-2015 Information technology Process assessment Requirements for process measurement frameworks《信息技术 过程评定 过程衡量架构要求》.pdf BS ISO IEC 33003-2015 Information technology Process assessment Requirements for process measurement frameworks《信息技术 过程评定 过程衡量架构要求》.pdf
  • BS ISO IEC 33004-2015 Information technology Process assessment Requirements for process reference process assessment and maturity models《信息技术 过程评定 过程参考 过程评定和成熟度模型要求》.pdf BS ISO IEC 33004-2015 Information technology Process assessment Requirements for process reference process assessment and maturity models《信息技术 过程评定 过程参考 过程评定和成熟度模型要求》.pdf
  • BS ISO IEC 33020-2015 Information technology Process assessment Process measurement framework for assessment of process capability《信息技术 过程评定 过程评定能力的过程衡量架构》.pdf BS ISO IEC 33020-2015 Information technology Process assessment Process measurement framework for assessment of process capability《信息技术 过程评定 过程评定能力的过程衡量架构》.pdf
  • BS ISO IEC 33063-2015 Information technology Process assessment Process assessment model for software testing《信息技术 过程评估 软件测试过程评估模型》.pdf BS ISO IEC 33063-2015 Information technology Process assessment Process assessment model for software testing《信息技术 过程评估 软件测试过程评估模型》.pdf
  • BS ISO IEC 33071-2016 Information technology Process assessment An integrated process capability assessment model for Enterprise processes《信息技术 过程评定 企业流程的集成过程能力评估模型》.pdf BS ISO IEC 33071-2016 Information technology Process assessment An integrated process capability assessment model for Enterprise processes《信息技术 过程评定 企业流程的集成过程能力评估模型》.pdf
  • BS ISO IEC 3788-1990 Information processing - 9-track 12 7 mm (0 5 in) wide magnetic tape for information interchange using phase encoding at 126 ftpmm (3200 ftpi) - 63 cp.pdf BS ISO IEC 3788-1990 Information processing - 9-track 12 7 mm (0 5 in) wide magnetic tape for information interchange using phase encoding at 126 ftpmm (3200 ftpi) - 63 cp.pdf
  • BS ISO IEC 38500-2015 Information technology Governance of IT for the organization《信息技术 组织的IT治理》.pdf BS ISO IEC 38500-2015 Information technology Governance of IT for the organization《信息技术 组织的IT治理》.pdf
  • 相关搜索

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

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