Question: C PROGRAMMING C PROGRAMMING Problem P.4 A linked list (8 points) Write a program that reads strings from standard input (the keyboard) and adds them
C PROGRAMMING
C PROGRAMMING

Problem P.4 A linked list (8 points) Write a program that reads strings from standard input (the keyboard) and adds them to the beginning of a linked list. A ZZZ will quit the program. After each insertion the list should be printed to the screen. Implement a function struct list*insertBegin(struct list*, char str[]) that im- plements the insertion of elements into the list. Also implement a printList() function. Use the following data structure: struct list { char str[20]; struct list* next; }; 5 You may not use global variables in your program. (struct list itself is a type and not a variable.) Testcase: input Testcase: output For simplicity there is a space after the last string in each row. apple banana apple orange banana apple plum orange banana apple ZZZ plum orange banana apple
Step by Step Solution
There are 3 Steps involved in it
To solve this problem we need to create a C program that utilizes a linked list to store strings entered from the keyboard The program will continue t... View full answer
Get step-by-step solutions from verified subject matter experts
