+ 2

How to sort the string...??

https://code.sololearn.com/cwBHOuj23EPk/?ref=app Example:-. *input* = bavli, arpita *output* = arpita,bavli Only contain first letter of string and sort.. Please anyone know that, then please help me... If you don't know, then pls share your friends who solve this code🙏🙏🙏 Please solve my error 😔..

2nd Feb 2021, 12:55 AM
Janvi Desai
5 Answers
+ 5
You can make use of strcmp() in string.h which returns 0 if both strings are equal or the difference between the characters that do not match. Compare every string in the array of strings with each other and check if the value returned is less/greater than 0, then swap their position in the array.
2nd Feb 2021, 1:16 AM
Mike A
Mike A - avatar
+ 3
I want to learn everything in Programming and clear my base. So, I try to implement the idea in Programming langauge which does comes to my mind. Nothing else Arsenic That's why first i do implement, after that if not comes answer. Then i ask question in discussing part.
2nd Feb 2021, 2:20 AM
Janvi Desai
+ 2
Can you share the source of the question ? Just wanna make sure it is not a part of an ongoing competition.
2nd Feb 2021, 1:17 AM
Arsenic
Arsenic - avatar
+ 2
Thank you Jegix
2nd Feb 2021, 2:21 AM
Janvi Desai
+ 2
No Shahzad . A<a this way. 👍
2nd Feb 2021, 7:08 AM
Janvi Desai