Question: Write a C program to implement the following requirement: Input: The program will read from the standard input any text up to 1 0 ,
Write a C program to implement the following requirement:
Input: The program will read from the standard input any text up to
characters.
Output: The program will sort the words in alphabetical order and
print to the standard output:
On the first line, the sorted words separated by a comma
On the second line, the index of the sorted words separated by a
comma The index start from
If two words are the same, the smaller index will appear first. A word
is a string without whitespaces spacetabnew line character
If the input text is empty or there is no word in the input text, the
program prints nothing to stdout.
SAMPLE INPUT
hello World!
SAMPLE OUTPUT
hello,World!
SAMPLE INPUT
SAMPLE OUTPUT
SAMPLE INPUT
This is the ST line. This is the ND line.
SAMPLE OUTPUT
STNDisisline.,line.,the,the,This,This
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
