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

HOW TO FIND OUT THE RREVERS OF A GIVEN DIGIT NUMBER IF IT
IS INPUT THROUGH THE KEYBORD BY USING C LANGUAGE

Answer Posted / prof.gagandeep jagdev

#include<stdio.h>
#include<conio.h>
long int num,result=0,i;
void main()
{
clrscr();
printf("\nenter the number to be reversed=");
scanf("%ld",&num);
while(num>0)
{
i=num%10;
num=num/10;
result=result*10+i;
}
printf("\nReversed number is=%ld",result);
getch();
}

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does pointer work in c?

1194


What is oops c?

1340


Does c have function or method?

1061


which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;

3331


What is the use of #define preprocessor in c?

1120


What is the use of structure padding in c?

1112


If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402

3966


What is the use of getch ()?

1118


Why is C language being considered a middle level language?

1208


write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.

2043


The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration

1154


Write a code on reverse string and its complexity.

1092


What is structure in c definition?

1111


exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above

1179


What are the different properties of variable number of arguments?

1203