ascending array sort in c code example
Example 1: how to sort an array in c'=
for (i = 0; i < n; ++i)
{
for (j = i + 1; j < n; ++j)
{
if (number[i] > number[j])
{
a = number[i];
number[i] = number[j];
number[j] = a;
}
}
Example 2: using sort function in c
void qsort(void *base, size_t nitems, size_t size, int (*compar)(const void *, const void*))