1. Engineering
  2. Computer Science
  3. for this weeks assignment you are to write a program...

Question: for this weeks assignment you are to write a program...

Question details

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);

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution