分类：电脑/网络-软件
问题：C语言问题#include&lt;stdio.h&gt;#def 
#include <std.h>#define N 80int fun(char *str){int i,j,k;i=strlen(str)-1;k=(strlen(str)+1)/2;for(j=0;j<k;j++){ if(str[j]!=str[i])break; i--;}if(j>=k)return1;else return0;}main(){  char s[N] ; FILE *out;  char *test[] = {"1234321", "123421", "123#include <std.h>#define N 80int fun(char *str){int i,j,k;i=strlen(str)-1;k=(strlen(str)+1)/2;for(j=0;j<k;j++){ if(str[j]!=str[i])break; i--;}if(j>=k)return1;else return0;}main(){  char s[N] ; FILE *out;  char *test[] = {"1234321", "123421", "123321", "abcdCBA"}; int i; printf("Enter a string: ") ; gets(s) ; printf("\n\n") ; puts(s) ; if(fun(s))   printf("  YES\n") ; else      printf("  NO\n") ; out=fopen("out.dat", "w"); for (i = 0; i < 4; i++)  if (fun(test[i]))   fprintf(out, "YES\n");  else   fprintf(out, "NO\n"); fclose(out);   }请问这错哪了啊？？？谢谢
回答：int fun(char *str) 
{int i,j,k; 
i=strlen(str)-1; 
k=(strlen(str)+1)/2; 
for(j=0;j<k;j++) 
{ 
if(str[j]!=str[i])break; 
i--;} 
if(j>=k)return1; //注意空格
else return0; //注意空格

}