Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Problems 1, 2 and 3 all refer to these pointer declarations: Node *listData, *pt

ID: 3560674 • Letter: P

Question

Problems 1, 2 and 3 all refer to these pointer declarations: Node *listData, *ptr1, *ptr2; And assume that later in the program, listData is set to the address of the first node of a list that holds these data in this order: 25,30,45,60,65,80,90. Write C statements to set ptr1 and ptr2 as directed. Set ptr1 to the address of the node holding 45. Set ptr2 to the address of the node holding 80. Given what you did in problem 1, and what you've learned about linked lists, show the values of each of the following expressions: ptr1 info ptr1 next info ptr1 next next next info == ptr2 info [1 or 0] ptr2 next next

Explanation / Answer

Question 3:
a)

listData->next->info=50;


b)
Node *ptr3;
ptr3->info=listData->next->info;
listData->next->info=listData->next->next->info;
listData->next->next->info=ptr3->info;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote