- Write A C Program To Implement The Following Requirement Input The Program Will Read From Standard Input Any Text Up T 1 (46.29 KiB) Viewed 21 times
Write a C program to implement the following requirement: Input: The program will read from standard input any text up t
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Write a C program to implement the following requirement: Input: The program will read from standard input any text up t
Write a C program to implement the following requirement: Input: The program will read from standard input any text up to 10,000 characters and store each word (a string that does not contain any whitespace with a maximum of 100 characters) into a node of a linked list, using the following struct: struct NODE { char *word; struct NODE *next; struct NODE *prev; }; Output: The program will print out 2 things - On the first line, the original list of words, each word is separated by a single comma - On the second line, the list of words after removing duplicate words, each word is separated by a single comma",". Note: If there is no word in the input text, the program must print the empty string to stdout. WN SAMPLE INPUT 1 hello world this is a single line SAMPLE OUTPUT 1 hello,world, this, is, a,single, line hello, world, this, is, a,single, line SAMPLE INPUT 2 This is the first line this is the second line line SAMPLE OUTPUT 2 This, is, the, first, line, this, is, the, second, line This, is, the, first, line, this, second