7 SLL
7 SLL
Design, Develop and Implement a menu driven Program in C for the following
operations on Singly Linked List (SLL) of Student Data with the fields: USN, Name,
Branch, Sem, PhNo
a. Create a SLL of N Students Data by using front insertion.
b. Display the status of SLL and count the number of nodes in it
c. Perform Insertion / Deletion at End of SLL
d. Perform Insertion / Deletion at Front of SLL (Demonstration of stack)
e. Exit .
*/
#include<stdio.h>
#include<stdlib.h>
void main()
{
int choice;
while(1)
{
printf("\n1. Create SSL\n2.Display SSL\n3.Insert front\n4.Insert end\n5.Delete
front\n6.Delete end\n7.EXIT\n");
printf("Enter your choice\n");
scanf("%d",&choice);
switch(choice)
{
case 1:create_SSL();
break;
case 2:display_count();
break;
case 3:insert_front();
break;
case 4:insert_end();
break;
case 5:delete_front();
break;
case 6:delete_end();
break;
case 7:return;
default:printf("\nInvalid choice\n");
}
}
}