字符调换(国外英文资料).docVIP

  • 3
  • 0
  • 约6.96万字
  • 约 17页
  • 2017-06-05 发布于河南
  • 举报
字符调换(国外英文资料)

字符替换 Character replacement: 1, please prepare encryptChar function (), according to a given alternative relations to replace all the characters in the xx array, is still in the array of xx position, finally calling function WriteDat () to xx output the results to the file PS10. The DAT. Substitution: f (p) = p * 11 mod 256 (p is an ASCII value of the characters in the array, f (p) is calculated after the new characters of ASCII value), even if the ASCII value of the original characters of or after the calculation f (p) value is less than or equal to 32, the character is the same, otherwise will f (p) of the character to replace. Some of the source programs exist in the file prog1.c. The format of the original data file is that the width of each row is less than 80 characters. Void encryptChar () {int I, k, f; I = 0; While (I maxline) (k = 0; k strlen (xx [I]); k + +. {f = (xx [k]). If (xx [I] [k] % 2 = = 0 | | f = 32) Xx [I] [k]. The else Xx [k] = f; } I++; }} 2, please prepare encryptChar function (), according to a given alternative relations to replace all the characters in the xx array, is still in the array of xx position, finally calling function WriteDat () the results output to a file xx PS8. DAT. Substitution: f (p) = p * 11 mod 256 (p is an ASCII value of the characters in the array, f (p) is calculated after the new characters of ASCII value), if the character is a lowercase letters or calculated value of f (p) is less than or equal to 32, the character is the same, otherwise will f (p) of the character to replace. Some of the source programs exist in the file prog1.c. The format of the original data file is that the width of each row is less than 80 characters. Void encryptChar () {int I, j, f; I = 0; While (I maxline) For (j = 0; j = 0; j + +) {f = xx [j] * 11. If [I] [j] [j] [j] [j] [j] [j] [j] [j] Xx [j] [j]. [j]. } I++; }} 3, please prepare encryptChar function (), according to a given alternative relations to replace all the characters in the x

文档评论(0)

1亿VIP精品文档

相关文档