C Program to Sort an array of names or strings
Given an array of strings in which all characters are of the same case, write a C function to sort them alphabetically.
The idea is to use qsort() in C and write a comparison function that uses strcmp() to compare two strings.
Given array is 0: geeksforgeeks 1: geeksquiz 2: clanguage Sorted array is 0: clanguage 1: geeksforgeeks 2: geeksquiz
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.