//PALINDROME: sequence that reads the same backwards as forwards.
//THIS PROGRAM HELP TO UNDERSTAND HOW PALINDROME WORKS.
#include<stdio.h>
#include<conio.h>
void main()
{
char one[10],two[10];
int cmp;
printf("enter the string:");
scanf("%s",one);
strcpy(two,one); //strcpy use to copy one to two
strrev(one); //strrev is used to reverse the string
cmp=strcmp(one,two); /*strcmp used to compair the two string*/
if (cmp==0)
{
printf("entered string is palindrome");
}
else
{
printf("string is not palindrome");
}
getch();
}
//THIS PROGRAM HELP TO UNDERSTAND HOW PALINDROME WORKS.
#include<stdio.h>
#include<conio.h>
void main()
{
char one[10],two[10];
int cmp;
printf("enter the string:");
scanf("%s",one);
strcpy(two,one); //strcpy use to copy one to two
strrev(one); //strrev is used to reverse the string
cmp=strcmp(one,two); /*strcmp used to compair the two string*/
if (cmp==0)
{
printf("entered string is palindrome");
}
else
{
printf("string is not palindrome");
}
getch();
}