Posts

Showing posts with the label Implement Circular Queue operations

Queue program #2

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