Untitled
unknown
plain_text
2 years ago
552 B
7
Indexable
#include<stdio.h>
#include<stdlib.h>
struct student
{
int rno;
struct student*next;
};
int main()
{
struct student*head,*temp,*newnode;
int choice;
head=NULL;
do
{
printf("\nMENU");
printf("\n 1.INSERT BEGINNING\n2.DELETE BEGINNING\n3.DISPLAY\n4.EXIT");
printf("\nEnter your Choice");
scanf("%d",&choice);
switch(choice)
{
case 1:
newnode=(struct student*)malloc(size of(struct student));
printf("Enter Roll No:");
scanf("%d",&newnode->rno);
if(head==NULL)
{
head=newnode;
newnode->Editor is loading...