Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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 a reference in C++?

1 Answers  


Do vectors start at 0?

0 Answers  


What are the syntactic rules to be avoid ambiguity in multiple inheritance?

0 Answers  


What is buffer and example?

0 Answers  


What is the role of static keyword for a class member variable?

0 Answers  


How would you use qsort() function to sort an array of structures?

0 Answers  


How can you link a c++ program to c functions?

0 Answers  


How to create a reference variable in C++

1 Answers  


If I is an integer variable, which is faster ++i or i++?

0 Answers  


What is the difference between Class and Structure?

40 Answers   HP, IBM, Samsung, TCS,


What is insertion sorting?

0 Answers  


What are the main differences between C and C++?

1 Answers  


Categories