Write a program which consists of four functions called from the main( ). The first function will display the user heading; the second function will prompt the user to fill an array of strings (a two dimensional array of char) with a number of words and indicate the preference for an ascending or descending sort. The third function will perform the desired sort using the Exchange Sorting technique; the last function will output the contents of the sorted array to the screen. All variables should be defined in main ( ) and passed as needed to the other functions. Use a null string (“”) value to terminate data entry in your Input_Words function. This function should also assign a value to a variable (e.g. num_words) that tracks the number of words to be sorted. DO NOT allow the user to input more than the maximum number of words.
Submit a cover sheet, Variable Definition Table, Pseudocode, Source Code Skeleton, Skeleton Complile, Source Code and RUNs (ascending and descending). The RUN should be SIMILAR to the following:
Ordering an Array Using the Exchange Sort
This program will allow the user to enter up to 25 words (<=20 chars) and specify the order of sorting (ascending or descending). The sorted array's contents output to the Screen.
Enter the words as requested, press <enter> in response
to another word to terminate data entry.
Enter Word Number 1 .......... Zebra
Enter Word Number 2 .......... House
Enter Word Number 3 .......... Apple
Enter Word Number 4 .......... Cat
Enter Word Number 5 ..........
Press "A" for Ascending or "D" for Descending ....... A
The Array's Contents in Ascending Order are:
Word Number 1 is Now .......... Apple
Word Number 2 is Now .......... Cat
Word Number 3 is Now .......... House
Word Number 4 is Now .......... Zebra