Answers for "write a c++ program that reads ten strings and store them in array of strings, sort them and finally print the sorted strings"

C++
0

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; 
}
Posted by: Guest on November-17-2020

Code answers related to "write a c++ program that reads ten strings and store them in array of strings, sort them and finally print the sorted strings"

Browse Popular Code Answers by Language