C program source code for insertion sort or sorting using arrays
Following is the source code for the insertion type sorting in Arrays . Copy the whole source code and save it in notepad with the extension either *.c or *.cpp .
Then open the saved file with your compiler and run the program .
printf("Enter the no. of elements you want to enter :\n");
printf("Enter the %d elements:\n",n);
printf("Elements of array after sorting are :");
You can change the values in the source code according to your needs . The screenshot shows the output of the program and so is the proof of a working program .Enjoy programming :) .