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

How we can differentiate between a pre and post increment operators during overloading?

1066


Will the following program execute?

1003


What is the return value of the insertion operator?

1105


Out of fgets() and gets() which function is safe to use and why?

1160


Define anonymous class.

1042


Give 10 points of differences between C & C++.

1100


What does it mean to declare a member variable as static?

1026


What are c++ storage classes?

1067


Can c++ do everything c can?

1023


What is the use of data hiding?

989


What are static and dynamic type checking?

1041


How do you clear a map in c++?

1089


What is the difference between method overloading and method overriding in c++?

1104


If a function doesn’t return a value, how do you declare the function?

1021


How can I disable the "echo" feature?

1118