Syntax of qsort() in C
void qsort(void* base, size_t num, size_t size, int (*compare)(const void*, const void*));
qsort() Function in C
The qsort()
function in C is a predefined function in the stdlib.h
library that is used to sort an array of items in ascending order or descending order. It stands for “quick sort,” as it implements the quicksort algorithm for sorting which is one of the fastest and most efficient algorithm to sort elements of an array.