Question: In C, can you write this code please? 1. Assume that you have the following Node declaration struct Node {int val; struct Node *next;}; a.

In C, can you write this code please?
1. 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. head 5 7 NULL Here is the function prototype: struct Node * CreateList(void) b. Write a C function called MaxValue() that takes a linked list and returns the maximum value in this linked list. Assume that the list does not include repeated values. Here is the function prototype: int MaxValue(struct Node thead) C. Write a function called SumList() that takes a linked list and returns the total of the values in the given linked list. Here is the function prototype: int SumList (struct Node *head)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
