Question: For this week's assignment you are to write a program that declares and initializes a string array of 20 random names. Define two functions ascSort()

For this week's assignment you are to write a program that declares and initializes a string array of 20 random names. Define two functions ascSort() and desSort() that both employ basic sort techniques. The function ascSort() should implement a bubble sort algorithm to sort the names in ascending order while desSort() should implement the selection sort algorithm to sort the names in descending order.

The function prototypes are as follows:

void ascSort(string[], int); void desSort(string[], int);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!