模拟试题

3773考试网计算机等级考试模拟试题正文

计算机等级考试三级数据库技术上机考试指导

来源:青年人 2010-9-8 17:34:02

 

 

分析:根据题意分析得出:本题主要考查考生的字符串指针或字符串数组以及根据公式进字符的ASCII值运算,再根据运算结果和条件进行相应的替代操作,要求考生仅编写函数encryptChar()实现转换功能。其中输入及输出函数给出且已调用,考生不必自己编写。

  编写函数encryptChar()的程序内容如下:

  void encryptChar()

  { int i, j, val ;

  for(i=0 ; i

  for(j=0 ; j

  val=(xx[i][j]*11) % 256 ;

  if(! (val<=32 || val>130)) xx[i][j]=val ;

  }

  }

  数据文件IN.DAT内容如下:

  You may WANT A FIELD in field in each record to uniquely identify that1234

  record from all other records IN THE FILE. For example, the Employee123456

  Number field is unique if you DO NOT ASSIGN the same number to two12345678

  different employees, and you never reassign THESE NUMBERS to other12345678

  employees. If you wish to FIND OR MODIFY the record belonging to a11111111

  specific employee, this unique FIELD SAVES the thouble of determining22222

  whether you have the correct record.12345678901234567

  If you do not have a unique field, YOU MUST FIND THE first record123456787

  the matches your key and determine whether THEN RECORD is the one you33333

  want. If it is not the CORRECT ONE, you must search again to find others.4

  结果文件OUT.DAT内容如下:

  Youm+3WAZTAF#EDDinbiWlLinW+AxrWAorLtouniquWl3iLWntib3tx+t1&1<rWAorLbrom+llotxWrrWAorLs#ZTHEF#DE.ForW(+mplW,txWEmplo3WW1&1

 

 

 

上一页  [1] [2] 

触屏版 电脑版
3773考试网 琼ICP备12003406号-1