Problem Statement: Sort String Values in AscendingOrder You are required to writ
ID: 3610472 • Letter: P
Question
Problem Statement: Sort String Values in AscendingOrder
You are required to write a program that accepts 5 input stringsfrom the user. After sorting strings into ascending order thestring will be displayed.
Detailed Description:
1. Declare acharacter type string array.
2. Use forloop
3. Get fivestring values from the user
4. Sort themin ascending order
5. Displaythem after sorting
6. Ascendingorder means string values starting from ‘a’ will comefirst, and then starting from ‘b’ and so on.
Sample Output
enter string1 : Muhammad
enter string2 : Abdullah
enter string3 : Usman
enter string4 : Ali
enter string5 : Noureen
Sorted string
Abdullah
Ali
Muhammad
Noureen
Explanation / Answer
please rate - thanks #include using namespace std; int main() {string input[5],temp; int i,j,n=5; for(i=0;iRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.