Enqueue function in simple Queue : Today We Know What is Enqueue Function in Simple Queue.Queue is also an abstract data type or a linear data structure, just like stack data structure, in which the first element is inserted from one end called the REAR
Enqueue function in simple Queue
void enqueue() { if(i<=4) { cout<<"Add number"<<endl; cin>>num[i]; i++;} else{cout<<endl<<"Error! Array is full.."<<endl; }}
Dequeue function in simple Queue
void dequeue() { for(int j=0;j<i;j++) num[j]=num[j+1]; i--; }
Display function in simple Queue
void show() { if(i==0) cout<<"Array is Empty"<<endl; else { for(int j=0;j<i;j++) { cout<<num[j]<<endl; }}}