#include<stdio.h>
#include<stdlib.h>
struct node
{
int info;
struct node *link;
};
void creation (struct node *,int);
void print_ll (struct node *);
void creation (struct node *start,int num)
{
struct node *temp,last;
int i;
printf(“enter the values of linked list”);
for(i=0;i<num;i++)
{
temp =(struct node)malloc(sizeof(struct node));
scanf("%d",&temp->info);
temp->link=NULL;
if(start==NULL)
start=temp;
else
last->link=temp;
last=temp;
}
}
void print_ll(struct node start)
{
struct node temp ;
temp = start;
while(temp != NULL)
{
printf("%d",temp->info);
temp = temp->link;
}
}
int main()
{
int n,p;
struct node *start=NULL;
printf(“enter the number of chains in linked list”);
scanf("%d",&n);
creation(start,n);
print_ll(start);
return 0;
}