Chapter:

Recursive-program-in-c

Program to find Palindrome using Recursion

A Palindrome is a sequence that if reversed looks identical to the original sequence Eg : abba, level, 999 etc.

Below is a simple C program to find whether the user input number is a palindrome or not using recursion:

Source code:

#include<stdio.h>


// declaring the recursive function

int isPal(int );


/*

    global declaration to use the same value 

    in both the functions

*/

int n;


int main()

{

    int palindrome;

    printf("\n\nEnter a number to check for Palindrome: ");

    scanf("%d", &n);

    palindrome = isPal(n);

    if(palindrome == 1)

       ....Show More

All Chapters

View all Chapter and number of question available From each chapter from C-programming-