sorted array of words lenghe c code code example
Example: write a c++ program that reads ten strings and store them in array of strings, sort them and finally print the sorted strings
void sortString(string &str)
{
sort(str.begin(), str.end());
cout << str;
}
// Driver program to test above function
int main()
{
string s = "geeksforgeeks";
sortString(s);
return 0;
}