Write a program to check that the input string is a palindrome or not
/******* Program **********/
#include<stdio.h>
#include<string.h>
main()
{
char str[20];
int i,j,len,cnt;
cnt = 0;
printf(“Enter string to test :”);
scanf(“%s”,str);
len = strlen(str);
for(i=0,j=len-1;i<j;i++,j–)
{
if(str[i] != str[j])
cnt++;
}
if(cnt == 0)
printf(“Given string is Palindrome ..n”);
else
printf(“Given string is not Palindrome..n”);
}