Question: What is produced from the following code ? Assume the node is in the usual info- link form with the info of type it. nodeType

What is produced from the following code ? Assume the node is in the usual info- link form with the info of type it.

nodeType *listA;

nodeType *PtrA;

listA = new nodeType ;

listA->info = 17;

PtrA = new nodeType;

PtrA->info = 22;

listA->link = NULL;

PtrA->link = listA;

listA = new nodeType ;

listA->info = 16;

listA->link = PtrA->link;

PtrA->link = listA;

cout << PtrA->info << " " <info << " ";

listA = listA->link;

cout << listA->info << endl;

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!