Find out if a string is a palindrome?

bool Palindrome(char *str)

{
int end = strlen(str)-1;
for (int i = 0; i
if (*(str+i) != *(str+end))
return false;
return true;
}

Leave a Comment