#include <stdio.h>
int revNumFunction(int num)
{
static int sum = 0, rem;
if (num)
{
rem = num % 10;
sum = sum * 10 + rem;
revNumFunction(num / 10);
}
else
return sum;
}
int main()
{
int num, revNum;
printf("enter number: ");
scanf("%d", &num);
revNum = revNumFunction(num);
printf("the number after reverse :%d", revNum);
return 0;
}