What is wrong in this?
#include<bits/stdc++.h>
using namespace std;
bool isPalindrome(string str)
{
char temp[1000];
int len=str.length();
int i=0;
while(len)
{
len--;
temp[i++]=str[len];
}
temp[i]='\0';
if (strcmp(str,temp)==0)
return true;
else
return false;
}