$20
Please finish Program Exercise #5 of the Quiz Section.
Please modify the justify program by rewriting the c file so that it stores the current line in a linked list. Each node in the list will store a single word. The line array will be replaced by a variable that points to the node containing the first word. This variable will store a null pointer whenever the line is empty. Please download the original version of the justify program from the Justify_source_code in the Writing Large Programs on the eCourse2. Also, please refer to pages 16 to 29 or pages 359 to 366 of the textbook for the introduction to the justify program. We will set the maximal length of one line as 60 characters (#define MAX_LINE_LEN 60 in line.c) and the maximal length of one as 20 characters (#define MAX_WORD_LEN 20 in justify.c). Please enter the inputs through the terminal ended with EOF by using the keyboard shortcut (in Windows, Control+Z; in Linux and Unix, Control+D).
When you submit your code to DOMjudge, please upload line.c alone and choose the language “C_Hw3_Q2”. If you did not use a linked list to store the current line, you cannot get the score of this question. The table below shows the example input and output of the justify program.
Input
Output
This is a Course that introduces C
This is a Course that introduces C
Pneumonoultramicroscopicsilicovolcanoconiosis has 45 letters!
Pneumonoultramicrosc* has 45 letters!
This is
an
example
This is an example