Insertion Sort Geekboots | C Programming | Jun 06, 2016 #include<stdio.h> int main() { int data[10], i, j, temp; printf("Enter 10 random number to sort in ascending order:\n"); for(i = 0; i < 10; i++) scanf("%d", &data[i]); /* Sorting process start */ for(i = 1; i < 10; i++) { for(j = i; j > 0; j--) { if(data[j] < data[j-1]) { temp = data[j-1]; data[j-1] = data[j]; data[j] = temp; } } } printf("After sort\n"); for(i = 0; i < 10; i++) printf("%d\n",data[i]); return 0; } Enter 10 random number to sort in ascending order:4618372590After sort0123456789 Learn more about Insertion Sort c c language c programming c coding for insertion sort insertion sort in c geekboots tutorial geekboots c programming c code for insertion sort