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
Get step-by-step solutions from verified subject matter experts
