HTML & JS
#include <stdio.h>

/* Iterative function to reverse digits of num*/
int reversDigits(int num)
{
	int rev_num = 0;
	while(num > 0)
	{
		rev_num = rev_num*10 + num%10;
		num = num/10;
	}
	return rev_num;
}

/*Driver program to test reversDigits*/
int main()
{
	int num = 1000000045;
	printf("Reverse of no. is %d", reversDigits(num));
	
	return 0;
}

Generated URL:

Output:

Reverse of no. is 1105032705
Report Bug