Question: Use the linked list pictured below for Exercises 9 through 12. listData 25 30-45 60 65-80 90 ptri ptr2 9. Give the values of the

 Use the linked list pictured below for Exercises 9 through 12.

Use the linked list pictured below for Exercises 9 through 12. listData 25 30-45 60 65-80 90 ptri ptr2 9. Give the values of the following expressions: a. ptrl->info b. ptr 2 ->next->info b. c. listData->next->next->info 10. Are the following expressions true or false? a. listdata->next-wptrl ptri b. ptrl->next->info -- 60 C. ptr 2 ->next = NULL d. listData->info -- 25 206 1 Chapter 3: ADT Unsorted List 11. Decide whether the syntax of each of the following statements is valid or invalid. If it is valid, mark it OK; if it is invalid, explain what is wrong. a. listData->next - ptrl->next; b. listData->next - (ptr2->next): c. list Data - ptr2; d. ptr 2 - ptrl->next->info: e. ptr 1.>info - ptr2-info: f. ptr2 - ptr2->next->next; 12. Write one statement to do each of the following: a. Make list Data point to the node containing 45. b. Make ptr2 point to the last node in the list, c. Make listData point to an empty list. d. Set the info member of the node containing 45 to 60. 18. Based on the following declarations, tell whether each statement below is syn- tactically legal (yes) or illegal (no). int P: inte: intor: int a: int b: int ci Yes Yes Yes / no o o a. P-new int: f. r - NULL; k delete : b. q. - new int: 9. ep: la-new pi c. a- new int; hp Pa: m. q- NULL: d. - i delete b: n. pa: c. b: j. - &c: 0. C NULL

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!