看看行不行
int judge(char *s1)
{
int key=1;
int len;
int i;
len=strlen(s1);
for(i=0;i<len/2;i++)
{
if(s1[i]!=s1[len-i-1])
{
key=0;
}
}
return key;
}
main()
{
int key;
unsigned char a[50]={"abcdcba"};
key=judge(a);
if(key==1)
{
printf("yes!\n");
}
else
{
printf("no!\n");
}
getch();
}