Five short pieces of code to trace by hand. For each one, work out the printed output, the resulting list, or the runtime behaviour against the reference list below.
struct Node* p = head->next;
printf("%d", p->next->data);
struct Node* p = head;
while (p->next != NULL) {
printf("%d ", p->data);
p = p->next;
}
head->next = head->next->next;
struct Node* newNode = (struct Node*)malloc(sizeof(struct Node));
newNode->data = 25;
newNode->next = head->next->next;
head->next->next = newNode;
struct Node* p = head;
while (p != NULL) {
p = p->next;
printf("%d ", p->data);
}