Question: Write a function, sortStrings, to arrange an array of n strings in ascending order. Assume the prototype is: void sortStrings(string a[], int n); Please Note:

Write a function, sortStrings, to arrange an array of n strings in ascending order. Assume the prototype is: void sortStrings(string a[], int n);

Please Note:

  • No I/O (cin or cout) should be in these functions. As a general design principle, I/O should be restricted to a few functions which are specifically used for this purpose. There is no need for I/O in these functions.
  • There is no need for temporary arrays. The space in the arrays passed as parameters is sufficient.
These functions can be written in either array-style or pointer-style

Step by Step Solution

3.53 Rating (153 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Solution Code and output include incl... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!