The string comparison was in lower case, so the same strings with different case were considered the same which can make qsort give different results on each sort since it's not a stable sort. Now take case into account in comparison.
The string comparison was in lower case, so the same strings with different case were considered the same which can make qsort give different results on each sort since it's not a stable sort. Now take case into account in comparison.