c - to find if a given string is palindrome or is not palindrome -


I have created a program to find out that the entry string is palindrome or not palindrome, but it always says That this is not a palindrome

  #include & lt; Conio.h & gt; # Include & lt; Graphics.h> #include & lt; String.h & gt; Zero main (zero) {int i, len, halflen, flag = 1; Four letters [50]; Clrscr (); Printf ("Enter a string: \ n"); Gets (STR); Lane = strlen (STR); Halflen = lane / 2; For (i = 0; i & lt; halfhell; i ++) {if (str [i]! = Str [i + halflen]) flag = 0; break; } If (flag) printf ("this is a paludrome."); Other printf ("This is not a pallidum."); Getch (); }   

In this "" program, you will say that this is an illusion!

You need to compare these two:

  if (str [i]! = Str [len-i] -1])  < 


Comments