Question: 2. Assume the node is in the usual info-link form with the info of type int. (list and ptr are pointers of type nodeType)

2. Assume the node is in the usual info-link form with the 

2. Assume the node is in the usual info-link form with the info of type int. (list and ptr are pointers of type nodeType) list new nodeType; list->info 10; ptr new nodeType; ptr->info 13; ptr->link NULL; list->link ptr; ptr = new nodeType; ptr->info ptr->link list->link 18; list->link; ptr; cout < < list->info < < " " < < ptr->info < < " "; ptr ptr->link; cout < < ptr->info < < endl; a) Show the output produced by the C++ code. (3 marks) b) Draw a diagram of the linked list after this code executes. (3 marks)

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 Programming Questions!