C Program To Reverse A Given Number

How to write a C Program to reverse a given number in C Programming Language ?

Solution For C Program:

/*C Program To Reverse A Given Number*/

#include<stdio.h>
void main()
{
int num, right_digit;
printf("\nEnter The Number : ");
scanf("%d", &num);
printf("\nThe Reverse of %d is : ", num);
while(num != 0)
{
right_digit = num % 10;
printf("%d", right_digit);
num = num / 10;
}
}


You may also learn these C Program/Code :

C Program To Swap Two Numbers Without Using Third Variable


Learn More :