题目很简单,但是有很多细节,我第一次编的时候只考虑到当字符串中的某个字符为‘z’或’Z’时,要将其转化为’a’或‘A’;
第一次的程序如下,编译运行通过
#include<stdio.h>
#include<string.h>
void func(char *p)
{
while(*p!=NULL)
{
if(*p=='z'| *p=='Z')
{
*p='a';
}
else
{
*p = *p + 1;
}
p++;
}
}
void main()
{
char str