✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Consider the following code:
struct node {
int data;
struct node *next;
};
struct node *head = NULL;
void insert(int data) {
struct node *n = malloc(sizeof(struct node));
n->data = data;
n->next = head;
head = n;
}
After executing:
insert(10);
insert(20);
insert(30);
What is the correct order of elements in the list?