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

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!