#include<iostream>
#include<conio.h>
#include<string>
using namespace std;
int main()
{
int i,len,t;
cin>>t;
char a[100],b[100];
while(t>0)
{
cin>>a;
len=strlen(a);len=len-1;
for(i=0;i<=len;i++)
{
b[i]=a[len-i];
}
cout<<"value of a\n"<<a<<"\n"<<b;
if(strcmp(a,b)==0)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
t--;
}
getch();
return 0;
}
every time the loop runs the garbage value of char b; remains. . .how to clear the old values of b?