#include<stdio.h>
#include<conio.h>
void main()
{
char word[10],word1[10];
printf("enter the string\n");
gets(word);
strcpy(word1,word);
if(strcmp(strrev(word),word1)==0)
{
printf("%s is palindrome\n",word1);
}
else
{
printf("%s is not palindrome\n",word1);
}
getch();
}
#include<conio.h>
void main()
{
char word[10],word1[10];
printf("enter the string\n");
gets(word);
strcpy(word1,word);
if(strcmp(strrev(word),word1)==0)
{
printf("%s is palindrome\n",word1);
}
else
{
printf("%s is not palindrome\n",word1);
}
getch();
}
No comments:
Post a Comment