my question here is two fold I am new to recursion and I am not going to lie. I dont get it at all, well at least the code part. is this considered recursive? and the second question is how do I make a loop that would let the user select y to enter another palindrome or n to quit. I know the laast part is easy I have been trying a do while loop but to no avail.
#include <stdio.h>
#include <string.h>
#define TRUE 1
#define FALSE 0
main ()
{
char str[30];
int isPalindrome = TRUE;
int i,j;
printf("Enter a word: ");
gets(str);
j = strlen(str) - 1;
i = 0;
while(i <= j && isPalindrome)
{
if(str[i] != str[j])
{
isPalindrome = FALSE;
}
i++;
j--;
}
if(isPalindrome)
{
printf("%s is a palindrome!\n", str);
}
else
{
printf("%s is not a palindrome\n", str);
}
}