I made a program to find if a entered string is palindrome or not palindrome but it always says that its not a palindrome
#include #include
A C-flavored solution : )
C
bool is_palindrome(const char* s) { const char* p = s; while (*p != '\0') ++p; while (s < p) if (*s++ != *--p) return false; return true; }