Join the social network of Tech Nerds, increase skill rank, get work, manage projects...

• # Implement Bubble Sort Using C

• 0
• 1
• 0
• 0
• 0
• 0
• 0
• 0
• 169
Comment on it

Bubble Sort:- Bubble Sort is the one of most popular Sorting Algorithm that is used to sort the array of n size. The Worst case and Average Case Complexity of Bubble Sort is O(n)^2. The Below Code will show you how to implement the bubble sort to sort the array of n size.

```#include<stdio.h>
#include<conio.h>
void main()
{
int size=0, a[100],i,j,temp;
clrscr();
printf("Enter the Size of Array:=");
scanf("%d",&size);
printf("Enter the Element of Array\n");
for(i=0;i<size;i++)
{
scanf("%d",&a[i]);
}
for(i=0;i<size-1;i++)
{
for(j=0;j<(size-i)-1;j++)
{
if(a[j]>a[j+1])
{
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
}
}

printf("Sorted Array is :\n");
for(i=0;i<size;i++)
{
printf("\n%d",a[i]);

}

getch();
}
```

## 0 Comment(s)

OR
OR
Register

OR
Fill out the form below and instructions to reset your password will be emailed to you:

• Hire
• Post Projects

### Post Projects

• All at 0 Cost ....
• Post Tech Job
• Select Best Bidder
• Track the Project
• Approve Work and Pay safely
• Browse Nerds
• Work
• Find Projects Find Projects
• UI Design and UX
• Software Engineering
View more...
View less...
• Marketing
• General
• Manage
• Company Company

### Manage Company

• All at 0 Cost ....
• Manage Company and Employee Profiles
• Company wide Employee Productivity Reports
• Knowledge Sharing and Collaboration Tools
• Get Sales Lead and Bid for Tech Projects
• Send Invoices and Receive Payment Safely
• Learn
• Nerd Digest Nerd Digest
• UI Design and UX
• Software Engineering
View more...
View less...
• Marketing
• General
• Tech Q & A Tech Q & A
• UI Design and UX
• Software Engineering
View more...
View less...
• Marketing
• General