i did the corrections and the code is running for all the test cases...still the code is not being accepted!

//lapindromes
#include<stdio.h>
#include<string.h>
int count(char str[],char ch)
{
int count=0,k=0;
while(str[k]!=’\0’)
{
if(str[k]==ch)
count++;
k++;
}
return count;
}
int main()
{
int t;
scanf("%d",&t);
while(t–)
{
int i,j,yes=1;
char s[1000];
scanf("%s",s);
char str1[501],str2[501];
int n=strlen(s);
if(n%2==0)
{
for(i=0;i<n/2;i++)
str1[i]=s[i];
str1[n/2]=’\0’;
for(j=n/2;j<n;j++)
str2[j]=s[j];
str2[n]=’\0’;
}
else
{
for(i=0;i<n/2;i++)
str1[i]=s[i];
str1[n/2]=’\0’;
for(j=n/2+1;s[j]!=’\0’;j++)
str2[j]=s[j];
str2[n]=’\0’;
}
int a,b;
for(i=0;i<strlen(str1);i++)
{
a=count(str1,str1[i]);
for(j=n/2;j<strlen(str2);j++)
b=count(str2,str1[i]);
if(a!=b)
{
yes=0;
break;
}
}
if(yes)
printf(“YES\n”);
else
printf(“NO\n”);
}
return 0;
}