Hi i wanna to know a method that can help me to make strings in alphabetical order | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Hi i wanna to know a method that can help me to make strings in alphabetical order

making some names in alphabetical order with c

8th Dec 2020, 10:44 PM
BAQQAL Hamza
BAQQAL Hamza - avatar
4 Answers
+ 2
In java it looks like this not sure if theres anything in c that does similar? String[] names = {"Tony","Amelia","Zack","David"}; Arrays.sort(names); System.out.printf(Arrays.toString(names));
8th Dec 2020, 10:59 PM
D_Stark
D_Stark - avatar
+ 2
D_Stark C has qsort(), will produce similar results as your code. But is the question about sorting? it seems more like permutations of string. I might be wrong.
8th Dec 2020, 11:52 PM
Flash
+ 1
Flash just a guess really,I think he wants to sort names in alphabetical order.
9th Dec 2020, 9:32 AM
D_Stark
D_Stark - avatar