Question -
Answer -
/*Function in C++ to perform insert in a dynamic queue is given as*/
struct DVD
{
long No; // DVD Number
char Title[20]; // DVD Title
DVD *Link
};
void insert(struct DVD *start, char data[20] ) ;
{
DVD *q, *temp;
// Dynamic memory has been allocated for a node
temp=(DVD*)malloc(size of (DVD));
temp=Title[20]=data[20] ;
temp"Next=NULL;
if (start = = NULL) /*Element
inserted at end*/
while (q"Next ! = NULL)
q=q.Next;
q.Next = temp;
}