Page 1 of 1
Write a C program to implement the following requirement: Input: The program will read from standard input 2 lines of te
Posted: Fri May 20, 2022 4:33 pm
by answerhappygod

- Write A C Program To Implement The Following Requirement Input The Program Will Read From Standard Input 2 Lines Of Te 1 (95.51 KiB) Viewed 24 times

- Write A C Program To Implement The Following Requirement Input The Program Will Read From Standard Input 2 Lines Of Te 2 (43.47 KiB) Viewed 24 times
Write a C program to implement the following requirement: Input: The program will read from standard input 2 lines of text (each line is separated by a newline character '\n') and then: - Store each word on the first line into a node of a linked list 11. No duplication allowed. Store each word on the second line into a node of a linked list L2. No duplication allowed. The implementation of a node of a linked list is the following: struct NODE { char *word; Struct NODE *next; }; Note: - A word is a string that does not contain any whitespace with a maximum of 100 characters. --The word(s) should be converted into LOWERCASE before adding to the linked list. - The input does not end with a new line character '\n'. Output: The program will print to standard output the list of common words of both Li and L2 in alphabetical order. Each word is separated by a single comma ".". If there is no such word, print nothing. Note: If there is nothing from stdin, print nothing.
CS240 - Programming in C SAMPLE INPUT 1 This is the first line. This test has 4 words that appear in both list. This is the second LINE. SAMPLE OUTPUT 1 is, line., the, this SAMPLE INPUT 2 Hello CS240, This is the FINAL EXAM. I SAMPLE OUTPUT 2 <empty>