bookNo = bNo;strepy (temp->bookName, bName);temp->next = NULL;return temp;};struct Queue createQueue () {struct Queue* q = (struct Queue* ) malloc (sizeof (struct Queue) );q->front = q->rear =...


struct Book {<br>int bookNo;<br>char bookName [100]:<br>struct Book* next;<br>};<br>struct Queue {<br>struct Book *front, *rear;<br>};<br>struct Book* newNode (int bNo, char bName [10]) {<br>struct Book* temp = (struct Book*) malloc (sizeof (struct Book) ) :<br>temp->bookNo = bNo;<br>strepy (temp->bookName, bName);<br>temp->next = NULL;<br>return temp;<br>};<br>struct Queue createQueue () {<br>struct Queue* q = (struct Queue* ) malloc (sizeof (struct Queue) );<br>q->front = q->rear = NULL;<br>return q;<br>};<br>int main () {<br>struct Queue* g = createQueue () ;<br>enQueue (q, 01, Iront->DOOKNO, g->Iront->bookName); printf ("Last Queue of the book : $d Book Title : is\n", q->rear->bookNo, g->rear->bookName); return 0; Figure Q3 a) Write a function named enqueue () with 3 parameters to insert the elements in a queue. "/>
Extracted text: struct Book { int bookNo; char bookName [100]: struct Book* next; }; struct Queue { struct Book *front, *rear; }; struct Book* newNode (int bNo, char bName [10]) { struct Book* temp = (struct Book*) malloc (sizeof (struct Book) ) : temp->bookNo = bNo; strepy (temp->bookName, bName); temp->next = NULL; return temp; }; struct Queue createQueue () { struct Queue* q = (struct Queue* ) malloc (sizeof (struct Queue) ); q->front = q->rear = NULL; return q; }; int main () { struct Queue* g = createQueue () ; enQueue (q, 01, "The History of Geumga Plaza"); enQueue (g, 02, "Unbeatable of Vincenzo Casano"); deQueue (q) : enQueue (q, 03, "The Rackless Babel Company"); deQueue (q) ; enQueue (q, 04, "It It's Okay to Not Be Okay"); printf("First Queue of the book : d Book Title : $s\n", g->Iront->DOOKNO, g->Iront->bookName); printf ("Last Queue of the book : $d Book Title : is\n", q->rear->bookNo, g->rear->bookName); return 0; Figure Q3 a) Write a function named enqueue () with 3 parameters to insert the elements in a queue.
Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here