Question: Write a C-program called llereate.c that creates a linked list of integers from user input. Your program should use the following functions: - vaid freeLl(NodeT

Write a C-program called llereate.c that creates a linked list of integers from user input. Your program should use the following functions: - vaid freeLl(NodeT "list): taken from the lecture. - void showLL(Node T " "ist): taken from the lecture but needs modification. - NodeT "joinLL(NodeT "ist, int v): returns a pointer to the linked list obtained by appending a new element with data v at the end of list. Needs to be implemented. The program - starts with an empty linked list called a11 (say), initialised to NULL - prompts the user with the message "Enter an integer:" - appends at the end of a11 a new linked list node created from user's response - asks for more user input and repeats the cycle - the cycle is terminated when the user enters any non-numeric character " on termination, the program generates the message "Done. List is" followed by the contents of the linked list in the format shown below A sample interaction is: prompts //11 create Enter an integer: 12 Enter an integer: 34 Enter an integer: 56 Enter an integer: quit Done. List is 12>34>56 Note that any non-numeric data 'finishes' the interaction. If the user provides no data, then no list should be output: prompts./11create Enter an integer: Done
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
