bookNo = bNo;strepy (temp->bookName, bName);temp->next = NULL;return temp;};struct Queue* createQueue () {struct Queue* q = (struct Queue*) malloc (sizeof (struct Queue));g->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 =<br>(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>g->front = q->rear = NULL;<br>return g;<br>};<br>int main () {<br>struct Queue* q = createQueue ();<br>enQueue (q, 01, front->bookNo, q->front->bookName); printf ("Last Queue of the book : %d Book Title : $s\n", q->rear->bookNo, q->rear->bookName); return 0; b) Write a function named dequeue () that removed the element in the 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)); g->front = q->rear = NULL; return g; }; int main () { struct Queue* q = createQueue (); enQueue (q, 01, "The History of Geumga Plaza"); enQueue (q, 02, "Unbeatable of Vincenzo Casano"); deQueue (a) ; 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", q->front->bookNo, q->front->bookName); printf ("Last Queue of the book : %d Book Title : $s\n", q->rear->bookNo, q->rear->bookName); return 0; b) Write a function named dequeue () that removed the element in the 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