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 C++ program to sort digits of all the 4 digit number
and display the sorted 4 digit number

Answer Posted / prasadnvk

i=0
while(num>0)
{
digit=num%10;
digitarr[i++]=digit;
num=num/10;

}
then sort the digitarr

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is #include cmath?

1100


What are associate containers?

1042


Differentiate between an external iterator and an internal iterator? What is the advantage of an external iterator.

1045


What are smart pointers?

2294


Write a Program for find and replace a character in a string.

1082


Explain linear search.

1064


How to give an alternate name to a namespace?

1088


Can we distribute function templates and class templates in object libraries?

1083


What are guid?

1249


What is the full form nasa?

1106


Why do we learn c++?

973


Define pre-condition and post-condition to a member function in c++?

1153


What is atoi?

975


Explain the term memory alignment?

1247


Explain the concept of memory leak?

1115