✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Elem *tmp = new Elem;
tmp->info = value;
tmp->next = NULL;
if (last != NULL)
last->next = tmp;
tmp->prev = last;
last = tmp;
if (first == NULL)
first = tmp;