Posted By

Bubble Sort Program in C

Education 4

#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
  • Chapai Nawabganj Municipality Night Guard Job Circular
    Chapai Nawabganj Municipality
    Education: Class 8
    Experience: 0 Years
    Deadline: 29 Nov 2018
  • Chapai Nawabganj Municipality Pipe line mechanic Job Circular
    Chapai Nawabganj Municipality
    Education: Class 8
    Experience: 0 Years
    Deadline: 29 Nov 2018
  • Chapai Nawabganj Municipality Electrician Job Circular
    Chapai Nawabganj Municipality
    Education: S.S.C/ Equivalent
    Experience: 0 Years
    Deadline: 29 Nov 2018
  • Chapai Nawabganj Municipality Surveyor  Job Circular
    Chapai Nawabganj Municipality
    Education: Diploma in Survey
    Experience: 0 Years
    Deadline: 29 Nov 2018
  • Chapai Nawabganj Municipality Market collector Job Circular
    Chapai Nawabganj Municipality
    Education: H.S.C/ Equivalent
    Experience: 0 Years
    Deadline: 29 Nov 2018