C Program for Palindrome
void main()
{
char ch[30];
char ch1[30];
int i,j,l;
clrscr();
printf("ENTER THE STRING: ");
gets(ch);
l=strlen(ch);
j=0;
for(i=l-1;i>=0;i--,j++)
ch1[j]=ch[i];
ch1[j]='\0';
if(strcmp(ch,ch1)==0)
printf("IT IS A PALINDROME");
else
printf("IT IS NOT A PALINDROME");
getch();
}
OUTPUT :
ENTER THE STRING: MALAYALAM
IT IS A PALINDROME