Question: Write a C program sort.c that prompts the user to enter the number of words to be sorted and stores them in an array. The
Write a C program sort.c that prompts the user to enter the number of words to be sorted and stores them in an array. The program then sorts the words in the array alphabetically and prints the sorted list to the screen. You may use strcmp()available in the string.h library to compare two strings alphabetically. The prototype of the sort function must look like:
void sort ( WordT *words, int numWords );
You must use the following type definition:
typedef struct {
char label[20];
} WordT;
(25 points)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
