Page 113 - DCAP201_FUNDAMENTALS_OF_DATA_STRUCTURES
P. 113
Fundamentals of Data Structures
Notes int ch;
clrscr();
printf("\n\nSINGLY LINKED LIST");
do
{
printf("\n\n1.CREATE\n2.INSERT\n3.DELETE\n4.EXIT");
printf("\n\nENTER YOUR CHOICE : ");
scanf("%d",&ch);
switch(ch)
{
case 1:
create();
display();
break;
case 2:
insert();
display();
break;
case 3:
delete();
display();
break;
case 4:
exit(0);
default:
printf("Invalid choice...");
}
}while(1);
}
Sample Input and Output:
Singly Linked List
1. Create
2. Insert
3. Delete
4. Exit
Enter Your Choice : 1
Enter the Data: 10
10
1. Create
Contd...
106 LOVELY PROFESSIONAL UNIVERSITY