C Program to reverse the digits of an number
Sample Input 1 :
734
Sample Output 1 :
347
Flow Chart Design
Try your Solution
Strongly recommended to Solve it on your own, Don't directly go to the solution given below.
#include<stdio.h>
int main()
{
//write your code here
}
Program or Solution
#include<stdio.h>
int main()
{
int num,rev,rem;
scanf("%d",&num);
while(num!=0)
{
rem=num%10;
rev=rev*10+rem;
num/=10;
}
printf("Reverse is %d",rev);
return 0;
}
Output

Program Explanation
refer video tutorialComments
Related Programs
- C Program to check whether the given digit is occurred in a Number
- C Program to count the occurence of digit
- C Program to find the first digit of a number
- C Program to Count the digits in the given number.
- C Program to calculate sum of digits.
- C Program to calculate product of digits.
- C Program to check whether given Integer is Palindrome or Not
- C Program to check whether given Integer is Armstrong or Not
coming Soon
coming Soon