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 / k.ashok kumar

BETTER CODE:


#include<stdio.h>
#include<conio.h>
void main()
{
int a;
clrscr();
printf("\n Enter a number : ");
scanf("%d",&a);
printf("\n Reverse number of %d is : ",a);
while(a)
{
printf("%d",a%10);
a/=10;
}
getch();
}

Is This Answer Correct ?    6 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are extern variables in c?

995


What are the features of the c language?

1088


What is the difference between pure virtual function and virtual function?

1129


What does %p mean?

1089


What is new line escape sequence?

1357


i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....

1980


What is a scope resolution operator in c?

1279


Find MAXIMUM of three distinct integers using a single C statement

1071


What are the disadvantages of a shell structure?

1355


Write a code to generate divisors of an integer?

1071


What is structure in c definition?

1056


What is the function of this pointer?

1347


What is a wrapper function in c?

1120


What is an auto keyword in c?

1099


Can we compile a program without main() function?

1131