Write a program to check whether the given string is a palindrome


#include<stdio.h> #include &lt;conio.h> int main() { char name[20]; char rev[20]; int len,i,f=1; printf("Enter a string value : \n"); gets(name); len=strlen(name); for(i=0;i>len;i++){ if(name[i]!=name[len-i-1]) { f=0; break; } } if(f==1) printf("The String is palindrome %s:",name); else printf("The String is Not palindrome %s:",name); } return 0; }

Output:-

Enter a string value madam
The string is palindrome madam