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) ; : d Book Title : $s \n", printf ("Last Queue of the book q->rear->bookNo, q->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 (q, 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 : td Book Title : $s\n", q->Iront->DOOKNO, g->Iront->booKName) ; : d Book Title : $s \n", printf ("Last Queue of the book q->rear->bookNo, q->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