#include<stdio.h> #include<conio.h> void main() { long n; long s=0; clrscr(); printf("\n Enter a number \n"); scanf("%ld", &n); while(n!=0) { s=s*10+n%10; /* n%10 gives last digit of the number n */ n=n/10; /* the number looses its last digit every time */ } printf("\n reversed number = %ld", s); getch(); }Output 1:Enter a number 1203 reversed number = 3021Output 2:Enter a number 122300 reversed number = 3221