#include<stdlib.h>
#include<stdio.h>
#include<string.h>
 
#ifndef HAVE_STRREV
void strrev(char *s)
{
	char t;
	int i, len = strlen(s);
	for (i = 0; i < --len; ++i) {
		t = s[i];
		s[i] = s[len];
		s[len] = t;
	}
}
#endif
 
int main()
{
 
char input[50];
char test[50];
 
int ret;
 
printf("Enter word or phrase to compare ");
fgets(input,sizeof(input),stdin);
strcpy(test,input);
 
strrev(input);

ret = strcmp(test,input);
 
if(ret == 0)
printf("\n this is a palindrome ");
 
else
printf("\n this is not a palindrome");
}