Program to Check If string is Palindrome (in C)
Bug
Given the input &quot;racebar&quot;, the function returns true.  The problem is that your boolean variable is reset after each character pair, so you are only really testing the first character with the last.  I would do the following:

Get rid of the boolean variable and return false on the first mismatch.
Fix the loop iteration to only iterate through half the string instead of the whole string.
Mark the input parameter as const, since you do not modify the input string.  This allows your function to accept both const strings and non-const string as arguments.
In C99, you can declare loop variables inside the loop itself, which helps to reduce the scope of these variables to only where they are used.

Here is a rewrite showing all of the above:
int palindrome(const char *s)
{
    for (int i = 0, n = strlen(s) - 1; i &lt; n; i++, n--) {
        if (toupper(s[i]) != toupper(s[n]))
            return 0;
    }

    return 1;
}