没有错误,就是有警告
#include #include
#define N 81
fun(char *s)
{ int i,length;
length=strlen(s);
for(i=0;i<LENGTH;I++)
{ if(!((s[i]>='a'&&s[i]<='z')||(s[i]>='A'&&s[i]<='Z')))
continue;
else switch (s[i])
{case 'z':s[i]='a';break;
case 'Z':s[i]='A';break;
default :s[i]=s[i]+1;
}
}
}
main()
{char a[N];
printf("Enter a string:");gets(a);
printf("The origina string is:");puts(a);
fun(a);
printf("The string after modified:");
puts(a);
}
没错误,有警告。另外我不懂调用函数根本没返回值,为啥a的值会变?求大家帮忙