Posted By

Bubble Sort Program in C

Education 29

#include

 

int main()

{         

 

    int i, j, size, temp;     

    size=10;     

    int number[10] = {9, 8, 3, 14, 61, 17, 91, 11, 21, 15};             

 

    for(i=0;i

    {        

        for(j=i+1;j

        {           

 

            if(number[i]>number[j]){              

                temp=number[i];              

                number[i]=number[j];              

                number[j]=temp;           

            }        

        }     

    }

 

printf("Sorted elements by using Selection Sort: ");     

 

    for(i=0;i

    printf(" %d",number[i]);       

    return 0;  

 

}

Bubble Sort Program in C

Login to comment login

Latest Jobs
  • Bangladesh Inland Water Transport Authority Junior River Surveyor Job Circular
    Bangladesh Inland Water Transport Authority
    Education: Bachelor Degree
    Experience: 0 Years
    Deadline: 10 Feb 2019
  • Bangladesh Inland Water Transport Authority River Surveyor Job Circular
    Bangladesh Inland Water Transport Authority
    Education: Bachelor Degree
    Experience: 0 Years
    Deadline: 10 Feb 2019
  • Bangladesh Navy Sub Assistant Engineer Job Circular
    Bangladesh Navy
    Education: B.Sc in Mechanical/ Computer Science Engineering
    Experience: 0 Years
    Deadline: 9 Feb 2019
  • LankaBangla Finance Limited Trainee Credit Analyst Job Circular
    LankaBangla Finance Limited
    Education: Graduate/Post Graduate
    Experience: 0 Years
    Deadline: 2 Feb 2019
  • Jahangirnagar University Store Keeper Job Circular
    Jahangirnagar University
    Education: Bachelor Degree
    Experience: 0 Years
    Deadline: 7 Feb 2019