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 / ganagdhara c

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

Is This Answer Correct ?    22 Yes 17 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none

1087


Is main is a keyword in c?

1068


Why is c faster?

1010


Can you tell me how to check whether a linked list is circular?

1319


Explain what is the heap?

1010


Is r written in c?

1106


Explain what does the format %10.2 mean when included in a printf statement?

1289


in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none

1024


which is an algorithm for sorting in a growing Lexicographic order

1743


What are types of functions?

969


Why doesnt the call scanf work?

1137


Difference between constant pointer and pointer to a constant.

1064


What is a void pointer? When is a void pointer used?

1018


The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference

1164


How are strings stored in c?

970