Question: Write a C program that includes the following operations: Assume that you have the following Node declaration struct Node { int val; struct Node *next;};

Write a C program that includes the following operations: Assume that you have the following Node declaration struct Node { int val; struct Node *next;}; a. Implement a C function called CreateList() that builds a linked list containing four elements by using dynamic memory allocation. Here is the function prototype: struct Node * CreateList(void) 5 [ 10 7 20 { D 1 Null Head b. Write a C function called MinValue() that takes a linked list and returns the minimum value in this linked list. Assume that the list does not include repeated values. Here is the function prototype: int MinValue(struct Node *head) c. Write a function called Average List that takes a linked list and returns the average of the values in the given linked list. Here is the function prototype: float Average List (struct Node *head) A sample run is as follows: --- Programming Quiz 3 --- enter element 0:7 enter element 1:2 enter element 2:9 enter element 3: 5 your list: 7295 Minimum value in the list is: 2. Average of the values in the list is: 5.750
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
