Given the CSV file cities.csv, this C program sorts the file and outputs a new CSV file (sorted.csv) with the columns city, population, and country. The rows are sorted in decreasing order by the population.
This program uses the qsort function from the standard C library.