#include
#include
void main()
{
char a[50] , b [50];
int x;
clrscr();
printf("Enter string ");
gets(a);
strcpy(b,a);
strrev(b);
x = strcmp(a,b);
if ( x == 0)
{
printf("it is a palindrome");
}
else
{
printf(" it is not palindrome");
}
getch();
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment