Академический Документы
Профессиональный Документы
Культура Документы
insert(); cin>>add_item;
} /*End of insert()*/
void delete_(){
return ;}else{
} /*End of delete() */
void display()
{int i;
if (front == - 1)
else {
cout<<"Queue is : \n";
cout<< queue_array[i];
cout<<"\n";}
} /*End of display() */
Question no 2: start = NULL;
all_in_one() { case 1:
main(){ obj.create_node();
cout<<endl; case 8:
obj.delete_begin(); obj.average();
cout<<endl; break;
break; default:
temp->data=value; p = start;
start->next=temp; cin>>value;
while(temp!=NULL){ s = s->next;}
create_node(value); cur=start;
temp->data=n; previous->next=current->next;}
temp->next=cur;} int v, p, i;
temp=start; return;}
if (s->data == v){
flag = true;
s = s->next;}
if (!flag)
void average(){
int value;
if (start == NULL){
cout<<"empty"<<endl;
return;}
ptr = start;
}*top,*top1,*temp; case 1:
display(); }
break; else
case 7: {
break;}}}
} if (top1 == NULL){
cout<<"Stack is empty";
{ cout<< top1->info;
{top1 = top;
int topelement(){
cout<<"\n All stack elements destroyed";
return(top->info);}
count = 0;
/* Check if stack is empty or not */
}
void empty(){
if (top == NULL)
else
void destroy(){
Question no 4: switch(ch){
cin>>no;
{ display();
while(1){ display();
new1->info=no;
new1->next=NULL;
if(rear==NULL||front==NULL){
front=new1;}else{
rear->next=new1;}
rear=new1;}
int delete_q(){
int no;
if(front==NULL||rear==NULL){
}else{ t=front;
no=t->info;
front=front->next;}
return(no);}
void display(){
t=front;
if(front==NULL||rear==NULL){
cout<<"\nQueue is empty";
exit(0);}
while(t!=NULL){
cout<<"\n %d",t->info;