C program to arrange numbers in ascending order

C program to arrange numbers in ascending order

Output:

Enter the number of elements to sort:
5
Enter the elements to sort:
2 3 1 5 4
The sorted array is:
1 2 3 4 5

Implementation: