A five-digit number is entered through the keyboard. Write a program which will re order the digits of the number from smallest to highest. Like, if you enter 54231 the program will show output as 12345. help me.

Help you with what? You didn't give us a clue what kind of help you need.

I have been doing programming in C and C++ for two years. I fetch so many problems regarding to global variable and function prototype as well as return value. Try to do coding less complexity as possible as you can. use function to create a task.

ROFLMAO - 2 years, and you can't do this brain-dead exercise.

My idea is you're just another drive-by recycling rubbish from other forums so you can spam your sig-link.

ya Bubble short is the best way.
# program for bubble short:

void bubble(int a[],int n)  
         int i,j,t;  
   void main()  
       int a[100],n,i;  
       printf("Enter integer value for total no.s of elements to be sorted: ");  
       for( i=0;i<=n-1;i++)  
             { printf("\n\n Enter integer value for element no.%d : ",i+1);  
        printf("\n\n Finally sorted array is: ");  
        for( i=0;i<=n-1;i++)  
 } //end program.
commented: Spoon-fed, unformatted, non-standard code - ugh! -4

Bad formatting, non-standard code.

Basically a bad post.