I am trying to write a funtion that will return the value of 1 if its string argument is a palindrome.
I have started but am unsure if it is correct. Could someone please take a look and point me in the right direction?
Int palindrome (const char *s)
int I, l;
l = strlen (s);
for (i=0; i<1/2; i++)
If (s[i] != s[l-i-1]) return 0;
It looks like you wrote this in a word processor rather than a code editor; C is case-sensitive. And perhaps you might be interested in more meaningful variable names, because it seems that you have confused the letter ell and the number one.
But if you can decipher your own algorithm in that, it's generally a good start. Ignoring punctuation, spacing, and letter case would need a bit more finesse.