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

What is void main () in c?

1194


What is %d called in c?

1218


Is a pointer a kind of array?

1170


Why is a semicolon (;) put at the end of every program statement?

1065


Explain Basic concepts of C language?

1143


What is meant by int main ()?

1199


Write a program to find the biggest number of three numbers in c?

1040


What is the difference between scanf and fscanf?

1256


Do you know what are bitwise shift operators in c programming?

1091


How to create struct variables?

1098


When should you use a type cast?

1115


Why do we use static in c?

1116


In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping

1501


What does int main () mean?

1015


Can we assign integer value to char in c?

1234