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
Can you pass an array to a function in c++?
Can I have a reference as a data member of a class? If yes, then how do I initialise it?
How do you initialize a string in c++?
Write bites in Turbo c++ Header ("Include") Files.
How java is different from c and c++?
What are iterators in c++?
What is a down cast?
Why we use #include iostream in c++?
What is #include ctype h in c++?
Would you rather wait for quicksort, linear search, or bubble sort on a 200000 element array? (Or go to lunch...) a) Quicksort b) Linear Search c) Bubble Sort
what is COPY CONSTRUCTOR and what is it used for?
Explain what happens when a pointer is deleted twice?
What is the precedence when there is a global variable and a local variable in the program with the same name?
Describe the advantages of operator overloading?
Can a constructor return a value?