link list in c++
TRANSCRIPT
-
8/7/2019 Link List in c++
1/3
-
8/7/2019 Link List in c++
2/3
char what='y';while(what=='y'){
coutsptr->name;coutsptr->Rno;
sptr->next=0;coutwhat;if(what=='y'){
sptr->next=new student;sptr=sptr->next;
}}
}void traverse(student *sptr){
char cond;clrscr();coutcond;while(sptr!=0){
cout
-
8/7/2019 Link List in c++
3/3
coutitem.name>>position;int point=1;student *ptr;ptr=&item;while(pointnext=sptr->next;ptr=sptr->next;
}sptr=sptr->next;point++;
}}void Del(student *sptr){
int position,point=1;
coutposition;student *ptr;while(pointnext=sptr->next;}ptr=sptr;sptr=sptr->next;
}}