#include <iostream>
using namespace std;
struct student
{
char name[20];
int age;
student *next;
};
int main()
{
student c = { "seri",18,NULL };
student b = { "bob",20,&c };
student a = {"jack",21,&b};
student *head = &a;
student* p = head;
while (p != NULL)
{
cout << p->name << " " << p->age << endl;
p = p->next;
}
system("pause");
}