Question: 2: Considering the following implementation for List class members fun1() and fun2() [4 marks] void List::fun1(List& 1){ Node c= 1.head; while(c != nullptr){ } }

2: Considering the following implementation for List class members fun1() and fun2() [4 marks] void List::fun1(List& 1){ Node c= 1.head; while(c != nullptr){ } } this->add_to_head(c->val); What the following main function with print? int main() { c=c->next; List list1, list2, list3; for (int i = 0; i < 5; i++) { list1.add_to_head (i); list1.add_to_tail(i); } } for (int j = 6; j<10; j++) { list2.add_to_tail(j); } list1.print(); cout << endl; for (int i = 0; i < 3; i++) { list1.remove_head(); list1.remove_tail(); list1.print(); cout << endl; list1.fun1(list2); list1.print(); void List::fun2(List& 1){ Node cl.head; while(c != nullptr){ if(c->next!=nullptr) } this->add_to_tail(c->val); c=c->next

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!