Posts

Showing posts with the label Implement Simple Queue operations

Queue program #1

Image
21. Implement Simple Queue using array that performs following operations: INSERT, DELETE, DISPLAY. #include<stdio.h> #define N 50 int q[N]; int f=-1; int r=-1; void enqueue(int y); int dequeue(); void display(); void main() {      int ch,x,a;     printf ("QUEUE OPERATION\n");     while (1)     {         printf ("------------------------------------------\n");         printf ("      1    -->    INSERT               \n");         printf ("      2    -->    DELETE               \n");         pr...