How do you back up your personal data?

Want to create a new poll now?
(Login Required)

How do you back up your personal data?

USB thumb drive 15 11.40
External hard drive 43 32.60
Optical disc 9 6.80
Memory card 14 10.60
Online backup service 23 17.40
Multiple methods 14 10.60
Network-attached storage device 14 10.60

Total Responses: 132

Not scientifically valid. Results are updated every 15 minutes.


Bubble sort in C-Language

Author: Renuka Email: ********
Last Updated: 8/6/2010 8:30:00 PM Views:
Level: Intermediate Downloads: 0


Sorting is arranging the given list in ascending/descending order, with respect to a given key field. This list can be number of records, with each record having many fields.

Types of sorting

  • Exchange/Bubble Sort
  • Selection Sort
  • Insertion Sort
  • Quick/Partition Exchange Sort
  • Merge/2-Way Merge Sort

Exchange/Bubble Sort : It uses simple algorithm. It sors by comparing each pair of adjusent items and swaping them in the order .This will be repeated until no swaps are needed. The algorithm got its name from the way smaller elements "bubble" to the top of the list.

It is not that much efficient, when a list is having more than a few elements. Among simple sorting algorithms, algorithms like insertion sort are usually considered as more efficient.
Bubble sort is little slower compared to other sorting techniques but it is easy because it deals with only two elements at a time.

An example to bubble sort is given below.

    #include <stdio.h>
    void main()        
        int a[10]={34,2,56,78,34,5,76,10,47,29};  //initializing array of elements
        int n=10;
        int i,j,temp;
        for(i=0;i<10;i++)            //for loop to select each element in the array
            for(j=0;j<n-i;j++)      //for loop to swap elements after comparing
                    temp=a[j];       //swaping
        for(i=0;i<n;i++)           //for loop to print sorted elements
                    printf("%d \n",a[i]);
rep:Bubble sort in C-Language
Pls explain me bubble sort with an example not by programming language.
rep:Bubble sort in C-Language
why it is not running in my "c-free5" application ???
rep:Bubble sort in C-Language
Exactly what i needed. I'll try it. I hope it will work for a beginner like me. Thanks.
rep:Bubble sort in C-Language
thanks for cleraring my doubts
rep:Bubble sort in C-Language
thank you for help in c language....
rep:Bubble sort in C-Language
thanks a lot
rep:Bubble sort in C-Language
Post your comments:

Name :    
Email :      
Subject :  
Message :    
Type the word :    

Contact us

You might also like this!