Please do a flowchart for the c++ linked list programme given. Hide quoted text void viewstudents(struct student *stt) { struct student *st=stt,*temp; char n[20]; int i=1; if(stt==NULL) coutnext;...



Please do a flowchart for the c++ linked list programme given.



Hide quoted text


void viewstudents(struct student *stt)

{

struct student *st=stt,*temp;

char n[20];

int i=1;

if(stt==NULL)

cout<"\nno>

else

{

while(st!=NULL)//sorting

{

temp=st->next;

while(temp!=NULL)

{

if(strcmp(st->id,temp->id)>0)

{

strcpy(n,st->name);

strcpy(st->name,temp->name);

strcpy(temp->name,n);

strcpy(n,st->id);

strcpy(st->id,temp->id);

strcpy(temp->id,n);

strcpy(n,st->addr);

strcpy(st->addr,temp->addr);

strcpy(temp->addr,n);

strcpy(n,st->ph);

strcpy(st->ph,temp->ph);

strcpy(temp->ph,n);

strcpy(n,st->dob);

strcpy(st->dob,temp->dob);

strcpy(temp->dob,n);

strcpy(n,st->cls);

strcpy(st->cls,temp->cls);

strcpy(temp->cls,n);

}

temp=temp->next;

}

st=st->next;

    }

     st=stt;

       cout<"\nno.\tname\t\tid\t\taddress\t\tphone>

while(st!=NULL)

{


      cout<><><>id<>addr<>ph<>dob<>cls;

st=st->next;

i++;

}

}

}



Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here