// a queue creatd with arrays and a menu #include using namespace std; int rear=0,front=0,size=5; int queue[5]={0}; void insert(void); void remove(void); void display(void); int main() { int option=0; while(option!=4) { cout << "\n\n\t\t\t Queue size is " << rear << endl; cout << "\t 1.Insert"<< endl; cout << "\t 2.Remove" << endl; cout << "\t 3.Display" << endl; cout << "\t 4.Exit" << endl; cin >> option; switch(option) { case 1: insert(); break; case 2: remove(); break; case 3: display(); break; case 4: printf("Goodbye!"); break; } getchar(); } getchar(); return 0; } void insert() { int t; if(rear> t; queue[rear]=t; rear++; } else { cout << "No room left..." << endl; } } void remove(void) { int i; cout << "Item " << queue[front] << " is removed." << endl; queue[front]=0; front++; } void display(void) { int i; cout << "Queue contains: "; for(i=front;i