MENU
Question -

Write a function POPBOOK( ) in C++ to perform delete operation from a Dynamic Stack, which contains Bno and Title. Consider the following definition of NODE, while writing your C++code.

struct NODE
{
int Bno;
char Title[20] ;
NODE * Link;
} ;



Answer -

node*PopBOOK(node*TOP int Bno, char B Title [20])
{
node*temp;
temp=new node;
temp —>Bno=Bno;
strcpy (temp —>Title, B Title);
temp ->link=NULL:
if (TOP==NULL)
Top=Temp;
else
{
temp —>link=Top;
TOP==temp;
}
}

Comment(S)

Show all Coment

Leave a Comment

Free - Previous Years Question Papers
Any questions? Ask us!
×