Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

to find out the reverse digit of a given number

Answer Posted / sreejesh1987

int rev(int,int);
void main()
{
int a,b;
clrscr();
printf("\nEnter the number to reverse:");//456
scanf("%d",&a);
b=a%10;//b=6
printf("\nReverse of the number is: %d",rev(a,b));
getch();
}

int rev(int a,int b)
{
if(a>9)//456
{
a=a/10;//a=45
b=b*10+a%10;//65
return rev(a,b);
}
else
return b;
}

Is This Answer Correct ?    3 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is use of bit field?

1236


Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;

1024


How do shell structures work?

1069


What is c value paradox explain?

1020


Describe the difference between = and == symbols in c programming?

1298


What is pre-emptive data structure and explain it with example?

3656


How can I sort more data than will fit in memory?

1042


provide an example of the Group by clause, when would you use this clause

2128


Why is #define used?

1229


Why c is called procedure oriented language?

999


How can I delete a file?

1016


Why ca not I do something like this?

971


Explain about C function prototype?

1026


Which header file is essential for using strcmp function?

1423


What does void main () mean?

1179