a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 70|回复: 0

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

[复制链接]
发表于 2012-7-31 21:12:12 | 显示全部楼层 |阅读模式
 分析:根据题意分析得出:本题主要考查考生的字符串指针或字符串数组以及根据公式进字符的ASCII值运算,再根据运算结果和条件进行相应的替代操作,要求考生仅编写函数encryptChar()实现转换功能。其中输入及输出函数给出且已调用,考生不必自己编写。   编写函数encryptChar()的程序内容如下:# |8 [. H# L6 i3 u/ P
  void encryptChar()2 x5 x6 t9 o" i+ q4 S+ {! `/ D
  {  int i, j, val ;# Q/ g; M. C/ Z$ o! r
  for(i=0 ; i
, ?1 [! C' Q0 M  S! v2 p- D9 Z/ ?  for(j=0 ; j
. }! k2 T- q4 ?) [  val=(xx[j]*11) % 256 ;
2 w! B! W5 b* D+ S# W1 a  if(! (val130)) xx[j]=val ;( R/ e, P4 \# K! M; C2 m: F8 _: }
  }
* z- r2 {% N4 c2 t  }
9 H  |; y1 e) I% g- O' ]8 Q) l  数据文件IN.DAT内容如下:. v; }2 t' }  `3 t* Z% Z
  You may WANT A FIELD in field in each record to uniquely identify that1234$ a6 N3 G: K1 Q6 _0 D
  record from all other records IN THE FILE. For example, the Employee1234560 C2 O! [1 z6 n  }8 o
  Number field is unique if you DO NOT ASSIGN the same number to two12345678: ?/ _# d2 H7 g) S
  different employees, and you never reassign THESE NUMBERS to other12345678" \1 p8 L  P" v5 d! {  z
  employees. If you wish to FIND OR MODIFY the record belonging to a11111111+ j! m  q3 y/ P7 i( @
  specific employee, this unique FIELD SAVES the thouble of determining22222" F/ Z$ j7 L7 X/ s0 o4 B- F
  whether you have the correct record.123456789012345670 b2 y# [/ T3 h8 e
  If you do not have a unique field, YOU MUST FIND THE first record123456787
1 a5 G! x. Z( P- R1 n4 y  V! R  the matches your key and determine whether THEN RECORD is the one you33333
  i! ^4 \: t: \$ g  want. If it is not the CORRECT ONE, you must search again to find others.4
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-5 08:01 , Processed in 0.357759 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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