a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 71|回复: 0

[数据库] 2012年计算机三级数据库技术上机指导:考试内容(2)

[复制链接]
发表于 2012-7-31 21:12:12 | 显示全部楼层 |阅读模式
 分析:根据题意分析得出:本题主要考查考生的字符串指针或字符串数组以及根据公式进字符的ASCII值运算,再根据运算结果和条件进行相应的替代操作,要求考生仅编写函数encryptChar()实现转换功能。其中输入及输出函数给出且已调用,考生不必自己编写。   编写函数encryptChar()的程序内容如下:
$ S( S, O) b5 j6 b9 G  void encryptChar()/ ^' S5 ?  `, B$ p/ W6 ?5 Q9 E8 B
  {  int i, j, val ;8 a% O; o- |) ~( K5 Q' g
  for(i=0 ; i
4 m) [* N- u9 }0 E  for(j=0 ; j
3 H7 m' d7 L4 N, m1 {( y+ w  val=(xx[j]*11) % 256 ;
9 c+ k- F# U% {/ d/ e* g  Y; N2 d  if(! (val130)) xx[j]=val ;+ B+ ^- r( ~4 k8 L$ F0 J4 B
  }0 y5 N5 C( m- J5 p2 o! m- c' U
  }% w9 M* V0 e9 |6 y5 L
  数据文件IN.DAT内容如下:
$ \: y+ U! e- J+ }( Y) u8 U8 k; N: n  You may WANT A FIELD in field in each record to uniquely identify that1234
; u4 q" b" s& a1 D5 }. \  record from all other records IN THE FILE. For example, the Employee123456" Y: [2 q% j# X: I' s5 @$ E$ u- e
  Number field is unique if you DO NOT ASSIGN the same number to two12345678/ r3 u. y; T- ?% \" [- y! e1 B/ l8 Q
  different employees, and you never reassign THESE NUMBERS to other12345678) }2 k% ?) L% l( [# g0 c1 ?% Z& C
  employees. If you wish to FIND OR MODIFY the record belonging to a11111111' ~5 j1 K! _  D: }
  specific employee, this unique FIELD SAVES the thouble of determining22222( F1 j. [. s0 z% y
  whether you have the correct record.12345678901234567
- ?' d! T3 N' z# h( N  If you do not have a unique field, YOU MUST FIND THE first record123456787
5 u# j' L9 I1 f, |* I2 K  the matches your key and determine whether THEN RECORD is the one you33333& b, {( v" X) L& d/ Z8 O3 k2 i0 b6 ]
  want. If it is not the CORRECT ONE, you must search again to find others.4
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Woexam.Com ( 湘ICP备18023104号 )

GMT+8, 2024-6-18 06:52 , Processed in 0.460863 second(s), 22 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表