Assume: class SNode { friend class SLL; char c; // as opposed to int data; SNode *next; }; Given the following linked li
Posted: Mon Jul 11, 2022 9:53 am
Assume: class SNode { friend class SLL; char c; // as opposed to int data; SNode *next; }; Given the following linked list, a->c->b->r->t->y->o->p-v->t-> If you run the following function, then print out the linked list (characters), what do you get? void SLL:: func4() { } SNode *tmp = first->next; first first->next; while ((tmp->next != NULL)&&(tmp->next->next != NULL)) { tmp->next = tmp->next->next; tmp = tmp->next; } if (tmp->next != NULL) { tmp->next = NULL; } last = tmp; Answer: