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

Explain how overloading takes place in c++?

0 Answers  


what is the basic concept of c++(object oriented programing)

4 Answers   Wipro,


Why do we use iterators?

0 Answers  


what is multi-threading in C++?

0 Answers  


What is tellg () in c++?

0 Answers  






Can union be self referenced?

0 Answers  


List the issue that the auto_ptr object handles?

0 Answers  


Explain the difference between class and struct in c++?

0 Answers  


Explain deep copy?

0 Answers  


Is c++ a good beginners programming language?

0 Answers  


What is the difference between passing by reference and passing a reference?

0 Answers  


How many characters are recognized by ANSI C++?

0 Answers   Hexaware, NIIT,


Categories