Sorting algorithms/Bubble sort: Difference between revisions

Content added Content deleted
(→‎{{header|C}}: constant)
(→‎{{header|C}}: there is no point in making a local variable const)
Line 226: Line 226:


=={{header|C}}==
=={{header|C}}==
<lang c>void bubble_sort(int *a, const int n) {
<lang c>void bubble_sort(int *a, int n) {
int i, j, t=1;
int i, j, t=1;
for (i = n - 1; i && t; i--) {
for (i = n - 1; i && t; i--) {