Write a program to test whether the given input string is palindrome or not.
/*level, madam, radar, refer, rotator, stats */
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char s[20]={'\0'},a[20]={'\0'};
int i,j,l=0;
clrscr();
printf("Enter String\n");
gets(s);
j=strlen(s)-1;
for(i=0;i<strlen(s);i++)
a[i]=s[j--];
for(i=0;i<strlen(s);i++)
{
if (s[i]!=a[i])
{
printf("\n The given input is not a Palindrome");
break;
}
else
{
l=1;
break;
}
}
if(l==1)
printf("\n The Given Input is Palindrome");
getch();
}