I made a program to find if a entered string is palindrome or not palindrome but it always says that its not a palindrome
#include
#include
Here you want something like...
if(str[i]!=str[strlen (str) - i - 1])
{
flag = 0;
break;
}
The break needs to go in the if block otherwise it will always get executed. Initialising flag at some point would be a good idea, too. If I might be permitted an observation, ALWAYS enclose the if-block and else block in curly brackets even if there is only one statement; it would save you several of the problems you've got here.
Later - edited per Mr Rodriguez' comments below.