Question: void doo(node *root) if(root !=0) { nodecint>*p=root; while(root->next!=0) root=root->next; p->data=root->data; } What is this code do? O a. set the first item in the linked

 void doo(node *root) if(root !=0) { nodecint>*p=root; while(root->next!=0) root=root->next; p->data=root->data; }

void doo(node *root) if(root !=0) { nodecint>*p=root; while(root->next!=0) root=root->next; p->data=root->data; } What is this code do? O a. set the first item in the linked list as the last item O b. doesn't do anything because the root parameter is passed by value O c. change the root item in the binary tree with the farthest leaf item O d. swap the first item with the last item in the linked list

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!