Docsity

Dynamic Stack Class 2-Handling Data Structures-Quiz, Exercises of Data Structures and Algorithms

Toggle sidebar
bg1
CS2143-2144 Data Structures Spring 2012
Quiz # 8...(19 April 2012)
Time 10 Minutes
Max. Marks 10
Name: Reg. No: ___
For the following dynamic fifo queu class, implement the following functions. Assume
all other functions given in the class have already been implemented.
int remove () // take out the oldest element inserted in the queue
class queueFIFO
{ protected:
struct node
{
int item;
node *next
}
node *head, *last;
node *get_node();
void free_node(node *);
public:
queueFIFO ();
void insert (int x);
int remove ();
};
Docsity.com

Partial preview of the text

Download Dynamic Stack Class 2-Handling Data Structures-Quiz and more Exercises Data Structures and Algorithms in PDF only on Docsity!

CS2143-2144 Data Structures Spring 2012

Quiz # 8...(19 April 2012)

Time 10 Minutes

Max. Marks 10

Name: Reg. No: ___

For the following dynamic fifo queu class , implement the following functions. Assume

all other functions given in the class have already been implemented.

int remove () // take out the oldest element inserted in the queue class queueFIFO { protected: struct node { int item; node *next } node *head, *last; node *get_node(); void free_node(node *); public: queueFIFO (); void insert (int x); int remove (); };

Docsity.com