int rev (int n);
void main()
{
int n;
clrscr();
printf("enter the value of n\t");
scanf("%d",&n);
printf("the reverse of the number is:\t%d",rev(n));
getch();
}
int rev (int n)
{
static int s=0;
if (n/10!=0)
{
s=n%10+s*10;
return rev(n/10);
}
else return  s = n+s*10;
}