Write code in C for Circular Queue through Array?
Long Answer
Views 439
Answer:
#include #include # define MAXSIZE 200 int queue[MAXSIZE]; int front=-1, rear=-1; //index pointing to the top of stack void main() { void enqueue(int); int dequeue(); int will=1,i,num,ch; while(will ==1) { printf("MAIN MENU: 1. Enqueue 2.Dequeue 3. Check Queue Full 4. Check Queue Empty "); Scanf ("%d", &ch); switch(ch) { case 1: printf("Enter the data to add... "); scanf("%d", &num); enqueue(num); break; case 2: num=dequeue(); if(num= = -1) printf(
Related Articles:
This section is dedicated exclusively to Questions & Answers. For an in-depth exploration of Data Structure, click the links and dive deeper into this subject.
Join Our telegram group to ask Questions
Click below button to join our groups.