#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
int first,last,flag=1;
char str[49];
clrscr();
printf("Enter number to get to check wheather palindrome or not");
gets(str);
first=0;
last=strlen(str)-1;
printf("%d",first);
printf("%d",last);
while(first<=last)
{
if(str[first]!=str[last])
flag=0;
first++;
last--;
}
if(flag==1)
{
clrscr();
printf("this is palindrome");
getch();
}
else
{
clrscr();
printf("sorry this is not a palindrome");
getch();
}
}