palindrome ??
Hi guys. so I have been trying to solve this problem and I wrote a bit of which I think its part of the solution. so I would apreciate a help from you guys.
~~~~~~~~~~~~~
A palindrome is a word, phrase, or any other sequence of letters that can be spelled the same way in either direction. For example, “level” and “noon” are palindromes. Write a recursive logical-function that returns 1 if the word is a palindrome and 0 otherwise. You may do it by matching the first letter with the last, the second with the next-to-last, and so on. Matching letters should be non-case- sensitive that is upper case letters match lower case letters. Notice that a single letter is not considered a palindrome.
Write a driver (main) function to prompt the user to enter a sentence. Use your recursive logical- function to count the number of palindromes in that sentence. You need to use String Tokenization (strtok) function to split the sentence into words.
int fun(char str[],int size);
int rec_fun(char str[],int size);
int main(void){
int sum;
char str[SIZE];
printf("Enter a sentence: \n");
sum=fun(str, SIZE);
gets(str);
rec_fun(str,SIZE);
printf("the sentance have %d pelidorum", sum);
getch();
return(0);
}
int fun(char str[],int size){
int flag, i, len, sum=0;