#include<stdio.h>
#include<malloc.h>
struct node{
int info;
struct node *link;
}*start;
void main(){
start=NULL;
int n,i,el;
printf("Enter the no. of elements u want 2 enter");
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&el);
createlist(el);
}
void createlist(int data){
struct node *q,*tmp;
tmp->info=data;
tmp->link=NULL;
if(start==NULL)
start=tmp;
else
{q =start;
while(q->link!=NULL)
q=q->link;
q->link=tmp;
}
}
struct node *q;
if(start==NULL)
{ printf("list is empty");
return;}
q=start;
printf("Lidt is :\n");
while(q!=NULL)
{ printf("%d",q->info);
q=q->link;
}
printf("\n");
}
when i am running this program i am getting an error: In function main undefined reference to createlist. can anyone help me out??