Code:
#include<iostream.h>
#include<conio.h>
struct node
{
int data;
char node.*link;
};
void main()
{
node,*front,*temp,*cur;
int ch;
front=NULL;
lab:
clrscr();
cout<<"queue operation"<<endl;
cout<<"1.insert \n 2.delete \n 3.display"<<endl;
cout<<"\n Enter your choice"<<endl;
cin<<ch;
switch(ch);
{
case 1:
{
temp=new.node;
cout<<"\n Enter the elements to be inserted"<<endl;
cin>>temp=data;
if(front==NULL)
{
temp->link=front;

front=temp;
cout<<"\n Inserted \n front="<<endl;
}
else
{
cur=front;
while (cur->link!=null)
cur=cur->link;
temp->link=NULL;
cur->link=temp;
}
break;
}
case 2:
{
if(front==NULL)
cout<<"\n QUEUE EMPTY:"<<endl;
else
{
cout<<"\n The elements deleted is:"<<front->data;
front=front->link;
}
break;
}
case 3:
{
if(front==NULL)
cout<<"\n QUEUE EMPTY:"<<endl;
else
{
cout<<"\n content is:"<<endl;
for(cur=front;cur!=NULL;cur=cur->link)
cout<<cul->data<<endl;

}
break;
}
default;
{
cout<<"\n Enter from 1 to 3"<<endl;
}
break;
}
cout<<"\n Do you want to continue:(y>o)";
cin>>ch;
if(ch!=0)
goto lab;
getch();
}
explain the concept of these program and important command line??

urgent anyone help!!!!!!!!!!!

Last edited by shabbir; 3Apr2010 at 21:10.. Reason: Code blocks