MCPcopy Create free account
hub / github.com/Lakhankumawat/LearnCPP / Insert

Function Insert

Q-Queue/QueueUsingArray.cpp:4–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2using namespace std;
3int queue[50], n=50, front=0, rear=-1;
4void Insert(){
5 int item;
6 if(rear== n-1) //Condition of Queue Overflow
7 {cout<<"Queue Overflow"<<endl;}
8else{
9 cout<<"Enter the item to insert: "<<endl;
10 cin>>item;
11 rear++;
12 queue[rear]=item;
13}}
14void Delete(){
15if((front==0 && rear==-1) || front==rear+1){ //Condition of Queue underflow
16 cout<<"Queue Underflow ";

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected