Question: Write a command line program in C, sortToken, that reads in a set of tokens and prints them out in alphabetical order, one token per

Write a command line program in "C", sortToken, that reads in a set of tokens and prints them out in alphabetical order, one token per line subject to the following:

1. You should verify that the command line contains at least one token.

2. Your program should conform to the following examples:

% sortToken

Error: no tokens present.

% sortToken e d c b a

a

b

c

d

e

%

You may assume that the following string sorting function is available:

void sortString(int array_length, char *string_array[ ]);

Hint: remember that argv[0] should not be included in the sort.

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!