#include<stdio.h>
#include<conio.h>
#define size 50
int ispalindrome(char ch[size])
{
int x,i,j,boolean;
for(x=0;ch[x]!='\0';x++);
for(i=0,j=x-1;i<x;i++,j--)
{
if(ch[i]==ch[j])
boolean=1;
else
{
boolean=0;
break;
}
}
return boolean;
}
void main()
{
char string[size];
clrscr();
printf("\nEnter the string : ");
scanf("%s",&string);
if(ispalindrome(string))
printf("\n\tThe string is palindrome");
else
printf("\n\tThe string is not palindrome");
getch();
}