- Assume Class Snode Friend Class Sll Char C As Opposed To Int Data Snode Next Given The Following Linked Li 1 (75.95 KiB) Viewed 26 times
Assume: class SNode { friend class SLL; char c; // as opposed to int data; SNode *next; }; Given the following linked li
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Assume: class SNode { friend class SLL; char c; // as opposed to int data; SNode *next; }; Given the following linked li
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: