How to write a C Program to reverse a given number in C Programming Language ?
Solution For C Program:
#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 :