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



Write a C++ program to sort digits of all the 4 digit number and display the sorted 4 digit number..

Answer / 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

More C++ General Interview Questions

Is c++ an oop?

0 Answers  


how to swap two numbers with out using temp variable

12 Answers   Global eProcure, TCS,


"How will you merge these two arrays? Write the program Array: A 1 18 22 43 Array: B 3 4 6 20 34 46 55 Output Array: C 1 3 4 6 18 20 22 34 43 46 55"

9 Answers   College School Exams Tests, HCL,


How many ways can a variable be initialized into in C++?

0 Answers   HCL,


Is sorted c++?

0 Answers  


Is c++ a good beginners programming language?

0 Answers  


What is DlgProc?

0 Answers   C DAC,


Give example of a pure virtual function in c++?

0 Answers  


What does new return if there is insufficient memory to make your new object?

0 Answers  


What is static function? Explain with an example

0 Answers  


what is Loop function? What are different types of Loops?

0 Answers  


Ask to write virtual base class code?

0 Answers   Satyam,


Categories