/*WAP to find the reverse of a number using function
with arguments but not return a value*/
#include<stdio.h>
void fn(int);
int main()
{
int n;
long int result;
printf("Enter n = ");
scanf("%d",&n);
fn(n);
return 0;
}
void fn(int x)
{
int rev,d;
while(x!=0)
{
d=x%10;
rev=rev*10+d;
x=x/10;
}
printf("\nResult = %d",rev);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: