#include<math.h>
void main()
{
long int num, rev = 0, dig;
clrscr();
printf(“nnt ENTER A NUMBER…: “);
scanf(“%ld”, &num);
while(num>0)
{
dig = num % 10;
rev = rev * 10 + dig;
num = num / 10;
}
printf(“nt REVERSED NUMBER IS…: %ld”, rev);
getch();
}
Not Satisfied ? Just search & get the result
Related posts:
- C Program to check whether a given number is palindrome or not
- C program to reverse a given integer number and check whether it is a palindrome. Output the given numbers with suitable message
- C program to accept an integer and reverse it
- C Program To find the sum of digits
- C program to check whether a given number is prime or not and output the given number with suitable message

{ 1 comment… read it below or add one }
C Program To reverse a given number