// This code creates a linked list to store PRN and names of n number of students. // We're not sure if there's anything more to it. For now, it only stores and displays. #include using namespace std; class node { int roll; string name; node *next; public: static node* create(); void display(node* head); }; node* node::create() { int total; node *head=NULL; node* point=NULL; cout<<"Total number of students are:\t"; cin>>total; for (int i=0; i>head->roll; cout<<"Enter name for student "<>head->name; head->next=NULL; point=head; } else { point->next=new node; point=point->next; cout << "Enter PRN number for student "<>point->roll; cout << "Enter name for student "<>point->name; point->next=NULL; } } return head; } void node::display(node* head) { node* point=this; cout<next) { cout<roll<<" -> "<name<display(head); return 0; }