Monday 20 December 2010

flow chart to implement Queue operations by using the pointers

Description :


In this program we have to implement the Queue operation by using the pointers. Here they Queue operation are push and pop. Push operation is used to insert the elements into a Queue and pop operation is used to remove the elements in to a Queue.


Output:


****IMPLEMENTATION OF QUEUE USING POINTERS****
==============================================
MENU
==============================================
[1] To insert an element 
[2] To remove an element 
[3] To display all the elements 
[4] Exit

Enter your choice:1

Element to be inserted:23


****IMPLEMENTATION OF QUEUE USING POINTERS****
==============================================
MENU
==============================================
[1] To insert an element 
[2] To remove an element 
[3] To display all the elements 
[4] Exit 

Enter your choice:3

Elements present in Queue are: 23


****IMPLEMENTATION OF QUEUE USING POINTERS****
==============================================
MENU
==============================================
[1] To insert an element 
[2] To remove an element 
[3] To display all the elements 
[4] Exit 
Enter your choice:2
23 is removed from the queue





****IMPLEMENTATION OF QUEUE USING POINTERS****
==============================================
MENU
==============================================
[1] To insert an element 
[2] To remove an element 
[3] To display all the elements 
[4] Exit 

Enter your choice:4
Exit

Conclusion : the program is error free


VIVA QUESTIONS: 

1) Define queue ?
Ans: A queue is a linear, sequential list of that are accessed in the oeder first in first out(FIFO).

2) Define circular queues ?
Ans: A queue can also be circular in which case, it is called as a circular queue



No comments:

Post a Comment