Question: 17) For a given doubly linked list if you call func(7) what is the output of the function? (10 point) Linked_list=[10,2,6,8,56,78,3,42] void func (int
17) For a given doubly linked list if you call func(7) what is the output of the function? (10 point) Linked_list=[10,2,6,8,56,78,3,42] void func (int val) struct Node* newNode-createNewNode (val); if (head--NULL) head-newNode; return; struct Node* current = head; while (current->next!=NULL) current-current->next; current->next = newNode; newNode->prev = current; printList(); //prints the linked list
Step by Step Solution
There are 3 Steps involved in it
include include using namespace std struct Node int data struct Node prev struct Node next Function ... View full answer
Get step-by-step solutions from verified subject matter experts
