Explain the bubble sort algorithm.



Explain the bubble sort algorithm...

Answer / Jitendra Kumar Mishra

Bubble Sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order. The pass through the list is repeated until the list is sorted. Each iteration of the loop reduces the largest unsorted item to the end.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

formula to convert 2500mmh2o into m3/hr

1 Answers  


What is a macro in c preprocessor?

1 Answers  


Why header file is used in c?

1 Answers  


fun(int x) { if(x > 0) fun(x/2); printf("%d", x); } above function is called as: fun(10); what will it print? }

17 Answers   NDS,


What is declaration and definition in c?

1 Answers  


int a=20; int b=30; int c=40; printf("%d%d%d"); what will be the output?

5 Answers   CMC,


What is true about the following C Functions (a) Need not return any value (b) Should always return an integer (c) Should always return a float (d) Should always return more than one value

2 Answers   DynPro, TCS,


what is reason of your company position's in india no. 1.

1 Answers   Accenture, TCS,


Look at the Code: main() { int a[]={1,2,3},i; for(i=0;i<3;i++) { printf("%d",*a); a++; } } Which Statement is/are True w.r.t the above code? I.Executes Successfully & Prints the contents of the array II.Gives the Error:Lvalue Required III.The address of the array should not be changed IV.None of the Above. A)Only I B)Only II C)II & III D)IV

5 Answers   Accenture,


What is the difference between single charater constant and string constant?

1 Answers  


#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }

1 Answers   Wilco,


When c language was developed?

1 Answers  


Categories