Write a Program Implementing LinkList:
#include<stdio.h>
#include<alloc.h>
struct node
{
int data;
struct node *next;
};
typedef struct node ND;
void main()
{
ND *temp,*start,*current;
int i;
start=NULL;
do
{
temp=(ND *)malloc(sizeof(ND));
printf("nn Enter the element:");
scanf("%d",&temp->data);
if(start==NULL)
start=current=temp;
else
{
current->next=temp;
current=temp;
}
printf("n Press 1 to Continue or 0 to exit:");
scanf("%d",&i);
}while(i==1);
current->next=NULL;
printf("n Elements of List:");
while(start!=NULL)
{
printf(" %d ",start->data);
start=start->next;
}
}

UNIQUE COMPUTER- 8981728365

Linklist Creation

  • 1.
    Write a ProgramImplementing LinkList: #include<stdio.h> #include<alloc.h> struct node { int data; struct node *next; }; typedef struct node ND; void main() { ND *temp,*start,*current; int i; start=NULL; do { temp=(ND *)malloc(sizeof(ND)); printf("nn Enter the element:"); scanf("%d",&temp->data); if(start==NULL) start=current=temp; else { current->next=temp; current=temp; } printf("n Press 1 to Continue or 0 to exit:"); scanf("%d",&i); }while(i==1); current->next=NULL; printf("n Elements of List:"); while(start!=NULL) { printf(" %d ",start->data); start=start->next; } } UNIQUE COMPUTER- 8981728365