#include <stdio.h>
#include <string.h>
int main() {
char str[90]=" ";
int i=0, l=0, count=0;
printf("enter a string: ");
scanf("%s",str);
l=strlen(str);
for (i=0;i<l/2;i++){
if(str[i]==str[l-i-1]){
count++;
}
}
if (count==i){
printf("\nthe string is palindrome");
}
else {
printf("\nthe given string is not a palindrome");
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: