Saved Bookmarks
| 1. |
Write a function in C++ to delete a node containing Books information ,from a dynamically allocated stack of Books implemented with the help of the following structure:struct Book{int BNo;char BName[20];Book *Next;}; |
|
Answer» struct Book { int BNo; char BName[20]; Book *Next; }*temp,*top; void pop() { temp=new Book ; temp=top; top=top->next; delete temp; } |
|