Question: struct Student { int id; string name; Student *next; }; 1. Using the struct definition above, create three Student objects by using three different

struct Student { int id; string name; Student *next; }; 1. Using

 

struct Student { int id; string name; Student *next; }; 1. Using the struct definition above, create three Student objects by using three different pointers and new operator. 2. Using your pointers fill id and name information for each Student object. 3. By using your pointers and next link your objects and fill the next pointer of the last object with NULL value. 4. Write a while loop to print your id and name information by using pointers only.

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