Question: > Question 9 Which of the following code segments would correctly delete the node with value 2 (the circled one) of this linked list?

\\ > Question 9 Which of the following code segments would correctlydelete the node with value 2 (the circled one) of this linked

> Question 9 Which of the following code segments would correctly delete the node with value 2 (the circled one) of this linked list? Select all that apply. Make sure you also free the space of the deleted node. The pointers prev and pres point to the first and the second node of the linked list respectively. 1 o 2 3 4 NULL Data next Dad next Data next Data nex O Head prev pres pres->next = prev->next; delete pres; prev->next = pres->next; prev->next = prev->next->next; delete pres; prev->next = pres->next; delete prev->next; prev->next = pres->next; delete pres; Question 8 10 ft."? Which code segment(s) to fill in the blank will have the correct output "Distance #include using namespace std; struct Distance { int feet; int inch; }; int main() { Distance d; d. feet = 10; d.inch = 5; Distance* ptr; ptr &d; cout feet (*ptr).feet nd->feet n ptr.feet

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!