#include
void main()
{
char *S;
int a,b;
clrscr();
printf("enter the sring->\t");
scanf("%s",S);
for(a=0;*(S+a)!='\0';a++);
a=a-1;
for(b=0;*(S+b)!='\0';b++)
{
if(*(S+b)!=*(S+a))
{
printf("it is not palindrome");
getch();
exit(1);
}
a=a-1;
}
printf("\n\n\n\n\t\t\t\tit is palindrome");
getch();
}
0 comments:
Post a Comment