/*insertion sort*/
#include<stdio.h>
#include<conio.h>
void main()
{
int a[100],n,k,i,j,temp;
clrscr();
printf("How many elements\n");
scanf("%d",&n);
printf("Enter the element of array");
for(i=0;i<=n-1;i++)
{
scanf("%d",&a[i]);
}
for(k=1;k<=n-1;k++)
{
temp=a[k];
j=k-1;
while((temp<a[j])&&(j>=0))
{
a[j+1]=a[j];
j=j-1;
}
a[j+1]=temp;
}
printf("Element of array after sorting\n");
for(i=0;i<=n-1;i++)
{
printf("%d\n",a[i]);
}
getch();
}

/*output of the program*/
How many elements
5
Enter the element of array
2
45
59
21
Element of array after sorting
1
2
21
45
59

Home       |      About Us       |     Portfolio       |      Services       |       Career        |    Contact Us       |      Industrial Training        |      Achievement
Corporate Services
  Web Design and development
  Web Promotion (SEO)
  Multimedia/CD Presentation
  Software development

  E.Commerce

Training@balujalabs

  Software Courses
  Hardware Courses
  Networking.Courses
  Mobile Repairing Courses
  UGC Degrees
Student Corner
 Programming & Projects
 Placement Papers
 Project Ideas
 Synopsis Ideas

  Franchise Section

 Administrator
Franchise Inquiry
 
 

To sort the elements of insertion sort technique. an array using

 

 

 

 

 

 

 

 

 

                                                                                                                                          

1 To sort the elements of an array using bubble sort technique
2 To sort the elements of an array using selection sort technique
3 To sort the elements of insertion sort technique. an array using
4 To sort an array using quick sort technique.
5 Program to implement radix sort.
6 To sort the element of an array using bucket sort technique
7 To implement merge sort

 

     
Home       |      About Us       |     Portfolio       |      Services       |       Career        |    Contact Us       |      Industrial Training        |      Achievement