We want to filter this list and extract the elements with an even index (the index starts at 0, hence the first, the third, the fifth, ... elements of the linked list have to be taken), without modifying the initial list. In other words, you should create an other list (in parallel of the initial one) that contains the nodes you want to keep and return the head of this new list you created.
Write the body of the function pair_filter
.
Hint : You should use memcpy(3) for this question
/* pair_filter
* Make a copy of the linked list starting at head,
* only taking the elements with an even index
*
* @head : head of a linked list, possibly NULL
* @return: pointer to the filtered linked list, return NULL if error or if head == NULL
*/
struct node *pair_filter(struct node *head) {