C Program for the reverse to the given number
#include<stdio.h>
#include<conio.h>
void main()
{
int n,r=0;
clrscr();
printf("enter any number for reverse\n");
scanf("%d",&n);
while(n!=0)
{
r=r*10+n%10;
n=n/10;
}
printf("\nAfter reverse the number is %d",r);
getch();
}
OUTPUT
enter any number for reverse1234
After reverse the number is 4321
You can also visit:-