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 / narendra

It is simple.use this and it works

#include <stdio.h>
#include <conio.h>

int main()
{
int rem,num;
clrscr();
printf("Enter the number\n");
scanf("%d",&num);
for (num= num; num > 0; num = num/10)
{

rem = num % 10;
printf("%d",rem);

}
return 0;
}

Is This Answer Correct ?    14 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of type qualifiers in c?

1032


By using C language input a date into it and if it is right?

1021


What is difference between structure and union with example?

990


What is dynamic memory allocation?

1283


any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above

983


How can I recover the file name given an open stream?

946


Why structure is used in c?

1113


What does int main () mean?

959


Explain the priority queues?

1033


What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?

994


Explain main function in c?

1045


What are different types of variables in c?

1009


Write a program to replace n bits from the position p of the bit representation of an inputted character x with the one's complement. Method invertBit takes 3 parameters x as input character, p as position and n as the number of positions from p. Replace n bits from pth position in 8 bit character x. Then return the characters by inverting the bits.

4150


If null and 0 are equivalent as null pointer constants, which should I use?

1120


Is a house a mass structure?

1052