HEY GUYS CHECK IT OUT AND PLZ REPLY ON HOW IT IS.

Code:
#include <iostream.h>
#include<conio.h>
#include<process.h>

struct node
{
int info;
node *link;
};
node *start=NULL;
node *last=NULL;

void display();
void ins_beg();
void ins_end();
void ins_pos();
void del_beg();
void del_end();
void del_item();
void search();
void rev();

void main()
{
int ch,ch1,ch2;
clrscr();
do
{
cout<<'\n';
cout<<'\n';
cout<<"\t  \n";
cout<<'\n';
cout<<"\t\t MAIN MENU \n";
cout<<'\n';
cout<<"\t\t 1. DISPLAY LINK LIST \n";
cout<<'\n';
cout<<"\t\t 2. INSERT IN LINK LIST \n";
cout<<'\n';
cout<<"\t\t 3. DELETE FROM LINK LIST \n";
cout<<'\n';
cout<<"\t\t 4. SEARCH THE LINK LIST \n";
cout<<'\n';
cout<<"\t\t 5. REVERSE THE LINK LIST \n";
cout<<'\n';
cout<<"\t\t 6. EXIT \n";
cout<<'\n';
cout<<"\t ENTER YOUR CHOICE FROM ABOVE OPTIONS ";
cin>>ch;
switch(ch)
{
case 1 :
       //DISPLAY THE LINK LIST
       display();
       break;
case 2 :
       //INSERT INTO LINK LIST
       clrscr();
       do
       {
       cout<<'\n';
       cout<<"\t\n";
       cout<<'\n';
       cout<<"\t\t   INSERTION MENU        \n";
       cout<<'\n';
       cout<<"\t\t   1. INSERT IN BEGINNING   \n";
       cout<<'\n';
       cout<<"\t\t   2. INSERT IN END         \n";
       cout<<'\n';
       cout<<"\t\t   3. INSERT IN POSITION    \n";
       cout<<'\n';
       cout<<"\t\t   4. EXIT                   \n";
       cout<<'\n';
       cout<<"\t ENTER YOUR CHOICE FROM ABOVE OPTIONS  \n";
       cin>>ch1;
       switch(ch1)
       { case 1 :
		 //ins_beg():
		 break;
	 case 2 :
		// ins_end();
		 break;
	 case 3 :
		// ins_pos();
		 break;
	 }
	 }while(ch1<4);
	 break;
case 3:
	//DELETION IN CIRCULAR LINK LIST
	clrscr();
	do
       {
       cout<<'\n';
       cout<<"\t \n";
       cout<<'\n';
       cout<<"\t\t   DELETION MENU        \n";
       cout<<'\n';
       cout<<"\t\t   1. DELETE FROM BEGINNING   \n";
       cout<<'\n';
       cout<<"\t\t   2. DELETE FROM  END         \n";
       cout<<'\n';
       cout<<"\t\t   3. DELETE AN ITEM    \n";
       cout<<'\n';
       cout<<"\t\t   4. EXIT                   \n";
       cout<<'\n';
       cout<<"\t ENTER YOUR CHOICE FROM ABOVE OPTIONS  \n";
       cin>>ch2;
       switch(ch2)
       { case 1 :
		// del_beg():
		 break;
	 case 2 :
		// del_end();
		 break;
	 case 3 :
		// del_item();
		 break;
	 }
	 }while(ch2<4);
	 break;
case 4:
	//SEARCHING CIRCULAR LINK LIST
       //search();
	break;
case 5:
	//REVERSING A LINK LIST
	//rev();
	break;
}
}while(ch<6);
getch();
}
void display()
{
 node *ptr;
 ptr= start;
 cout<<"\n START -> ";
 while(ptr->link!=start)
 {
 cout<<ptr->info<<"->";
 ptr=ptr->link;
 }
 cout<<ptr->info;
 getch();
 }

void ins_beg()
{
node *p;
p= new node;
if(p==NULL)
{
cout<<"OVERFLOW \n";
getch();
exit(0);
}
cout<<"ENTER DATA TO BE INSERTED ";
cin>>p->info;
if(start==NULL)
{
p->link=p;
start=p;
last=p;
}
else
{
p->link=start;
start=p;
last->link=p;
}
getch();
}

void ins_end()
{
node *p;
p=new node;
if(p==NULL)
{
cout<<"OVERFLOW\n";
getch();
exit(0);
}
cout<<"ENTER DATA TO BE INSERTED ";
cin>>p->info;
if(start==NULL)
{
p->link=p;
start=p;
last=p;
}
else
{
p->link=start;
last->link=p;
last=p;
}
getch();
}

void ins_pos()
{
int pos;
cout<<"ENTER POSITION TO BE INSERTED \n";
cin>>pos;
if(pos==1)
ins_beg();
else
{
node *ptr=start->link;
int i =2;
while(i<pos && ptr->link!=start)
{

Last edited by shabbir; 16Oct2008 at 08:42.. Reason: Code block