int main(void) {
int temp, i, start, end, size =0, count =0, num[MAX_SIZE] = {0};
printf("Enter start and end: ");
scanf("%d %d", &start, &end);
// From start to end, numbers are passed into isPalindrome function to
// determine whether it is a palindrome. The 'count' of palindrome within
// this range is then printed.
while(start <= end) {
temp = start;
for(i=0;temp>0;i++) {
num[i] = temp % 10;
temp /= 10;
size++;
}
count += isPalindrome(num, size);
start++;
}
printf("Number of palindrome numbers = %d\n", count);
return 0;
}
// Return 1 if arr is a palindrome, or 0 otherwise.
// Driver function to call recursive function palindromeRecur()
int isPalindrome(int arr[], int size) {
int i=0;
return palindromeRecur(arr, i, size);
}
// Return 1 if arr is a palindrome, or 0 otherwise.
// Recursive function
int palindromeRecur(int arr[], int i, int size) {
if(size <= i)
return 1;