#include "stdio.h"

#define KEY 5;

int main()

{

char password[50] = "123456";

encrypt(password);

printf("加密后的字符串为:",password);

return 1;

}

 

/**

*加密函数

*返回字符串数组。数组名即数组的首地址,所有声明 char * 可以表示返回数组。

**/

char * encrypt(char password[])

{

int i = 0;

int count = strlen(password);

for(;i<count;i++)

{

password[i] = password[i] + i + KEY;

}

return password;

}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-15
猜你喜欢
  • 2022-02-17
  • 2021-11-10
  • 2022-01-16
  • 2021-05-04
  • 2022-12-23
相关资源
相似解决方案