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

What is abstraction in c++?

0 Answers  


What is an orthogonal base class in c++?

0 Answers  


which of the following is not an secondary constant a) array b) real c) union

0 Answers  


What is the main purpose of overloading operators?

0 Answers  


What is the best way to take screenshots of a window with c++ in windows?

0 Answers  






what is static function

2 Answers   Patni,


Write about the scope resolution operator?

0 Answers  


Explain storage qualifiers in c++.

0 Answers  


write a C++ programming using for loop: * * * * * * * * * *

4 Answers   TCS,


What is c++ namespace?

0 Answers  


Do the names of parameters have to agree in the prototype, definition, and call to the function?

0 Answers  


How do I write a c++ program?

0 Answers  


Categories