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 reverse number of a digit if it is
input through the keyboard?

Answer Posted / sneha

main( )
{
int x,result,next;
printf("Enter The number to revers=");
scanf("%d",&x);
//5th
result=x%10;
result=result*10;
//4th
next=(x/10)%10;
result=(result+next)*10;
//3rd
next=(x/100)%10;
result=(result+next)*10;
//2nd
next=(x/1000)%10;
result=(result+next)*10;
//1st
next=(x/10000)%10;
result=result+next;
printf("%d",result);
}

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When is the “void” keyword used in a function?

1430


define string ?

1059


hi send me sample aptitude papers of cts?

2107


Which is best book for data structures in c?

1041


What does typeof return in c?

1022


program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)

2048


What is a stream?

1078


What are the functions to open and close the file in c language?

989


Is main is a keyword in c?

1075


What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers

1198


Tell me the use of bit field in c language?

1019


When should the const modifier be used?

1062


What does sizeof return c?

1015


Can a pointer be volatile in c?

935


What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

1171