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

Describe the steps to insert data into a singly linked list.

1016


What is c system32 taskhostw exe?

972


1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.

2101


Explain what is a static function?

1043


Can a void pointer point to a function?

967


What is file in c language?

958


Where is c used?

1027


What is the purpose of sprintf() function?

1052


What is a pragma?

1073


What is the difference between array and structure in c?

1074


What is malloc return c?

970


Hai what is the different types of versions and their differences

1895


Why header files are used?

1060


Write a Program to accept different goods with the number, price and date of purchase and display them

6139


Is c a great language, or what?

1047