If we divide a integer number by 10. Then the reminder will be the last digit of the number and result will be the remaining digit.
let the number is 1234. then 1234 % 10 = 4 and 1234 / 10 = 123
void main() { int no,s=0; printf("Enter a number"); scanf("%d",&no); while(no>0) { s=s*10+(no%10); no /=10; } printf("Reverse No Is %d",s); }