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


Please Help Members By Posting Answers For Below Questions

Will this c++ program execute or not?

702


What is long in c++?

837


Are there any special rules about inlining?

667


What are static and dynamic type checking?

704


Why Pointers are not used in C++?

699






What is a breakpoint?

651


What is the best c++ compiler?

680


What is flush programming?

663


What is the difference between C and CPP?

719


Explain how a pointer to function can be declared in C++?

659


Can I learn c++ without c?

762


Can we distribute function templates and class templates in object libraries?

675


Can member data be public?

689


Write a c program for binary addition of two 8 bit numbers.

3758


What causes a runtime error c++?

695