Note: (Restricted functionality due to obvious reasons!)
Minimal Code ( Raw-View ) :
#include<iostream.h>
#include<conio.h>
int sz = 5, TopPtr = 0;
void display(int ar[]){
cout<<"\n Array is : \n";
for(int i =0; i<sz; i++){
cout<< i <<" : "<<ar[ i ]<<"\n";
}
}
void display(int ar[], int aSize){
cout<<"\n Array is : \n";
for(int i =0; i<aSize; i++){
cout<< i <<" : "<<ar[ i ]<<"\n";
}
}
void insert(int ar[]){
int pos, el;
cout<<"\n Enter Position, Element respectively : \n";
cin>>pos >> ar[pos];
display(ar);
}
void del(int ar[]){
int pos, el;
cout<<"\n Enter Position, Element respectively : \n";
cin>>pos >> ar[pos];
display(ar);
}
void main(){
int arry[50], choice, tmpN=1;
cin>>sz;
for(int i=0;i<50;i++){ arry[i] = -1; }
do{
cout<<"\n -----------\n 1 : Push/Insert";
cout<<"\n 2 : Pop / Remove";
cout<<"\n 3 : Display \n Enter choice >> ";
cin>> choice ;
if(choice < -100){ break; }
if(choice < 1){ continue; } //
else if(choice == 1){cout<<"insert(arry)";}
else if(choice == 2){cout<<"del(arry)";}
else if(choice == 3){cout<<"display(arry)";}
display(arry , 3);
}while(choice <=3);
}