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
Explain explicit container.
Explain the use of this pointer?
what do you mean by volatile variable?
Are c and c++ different?
what are the events occur in intr activated on interrupt vector table
What is functions syntax in c++?
Explain how a pointer to function can be declared in C++?
When are exception objects created?
Which is better c++ or java?
Can static member variables be private?
What is the difference between while and do while loop? Explain with examples.
If a round rectangle has straight edges and rounded corners, your roundrect class inherits both from rectangle and from circle, and they in turn both inherit from shape, how many shapes are created when you create a roundrect?
What is the difference between set and map in c++?
Explain public, protected, private in c++?
What is a pointer how and when is it used?