PROGRAM:
#include<stdio.h>
#include<string.h>
main()
{
char
s[20],s1[20]; printf("Enter a String\n"); scanf("%s",s);
strcpy(s1,s); if(strcmp(s,s1)==0)
printf("The Given String is
Palindrome\n");
else
printf("The Given String is Not
Palindrome\n");
}
OUTPUT:
Enter
a String madam
The Given String is
Palindrome
No comments:
Post a Comment