We ask you to write two simple functions that are needed to implement a simple linked list.
/**
* Structure node
*
* @next: pointer to the next node in the list, NULL if last node_t
* @value: value stored in the node
*/
typedef struct node {
struct node *next;
int value;
} node_t;
/**
* Structure list
*
* @first: first node of the list, NULL if list is empty
* @size: number of nodes in the list
*/
typedef struct list {
struct node *first;
int size;
} list_t;
In your functions, you cannot use the function calloc(3)
NB : Do not forget to verify the returned value of malloc and don't forget to manage the error cases as mentioned in the following specifications.
INGInious