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 a modifier in c++?

1081


Write a recursive program to calculate factorial in c++.

1028


Is c++ high level programming language?

1077


Can user-defined object be declared as static data member of another class?

969


Which of the following is not a valid declaration for main() a) int main() b) int main(int argc, char *argv[]) c) They both work

1010


Does c++ have arraylist?

968


what is the use of void main() in C++ language?

1065


What are the various access specifiers in c++?

983


Does there exist any way to make the command line arguments available to other functions without passing them as arguments to the function?

1201


How can you quickly find the number of elements stored in a static array? Why is it difficult to store linked list in an array?

941


What is flush () in c++?

1037


What is object file? How can you access object file?

1126


Program to check whether a word is a sub-string or not of a string typed

1979


what is pre-processor in C++?

1092


Difference between overloaded functions and overridden functions

1005