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...

write a program to display reverse of a number using for
loop?

Answer Posted / jayesh jain

#include<stdio.h>
#include<conio.h>
void main()
{
int num,i;
int rem;
clrscr();
printf("\n enter number");
scanf("%ld",&num);
printf("\n the reverse of number %ld is ",num);
for(i=0;num>0;i++)
{
rem=num%10;
num=num/10;
printf("%d",rem);
}
getch();
}

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of a static variable in c?

1010


Explain union. What are its advantages?

1010


What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }

1133


What is a pointer on a pointer in c programming language?

1093


What is void pointers in c?

960


what is the differnce between programing langauge and tool? is sas is a programing langauge r tool?

2310


Explain the difference between malloc() and calloc() function?

989


What are header files? What are their uses?

1125


What is 02d in c?

1030


What is pass by value in c?

1009


How macro execution is faster than function ?

1134


What is a macro in c preprocessor?

1056


What are the differences between new and malloc in C?

1075


Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

1035


write a program for the normal snake games find in most of the mobiles.

2219