#ifndef _MY_LINKED_LIST #define _MY_LINKED_LIST 1 #include typedef struct list { void *data; struct list*next; } list; list* create() { list*new_node = (list*)malloc (sizeof(list)); return new_node; } void insert(list**temp,void *num,size_t size) { printf("inside insert\n"); struct list *cur = create(); cur->next = NULL; printf("Heere\n"); memcpy(cur->data,num,size); printf("over\n"); if(*temp == NULL) { *temp=cur; } else { struct list*poin = *temp; while(poin->next !=NULL) { poin = poin->next; } memcpy(poin->next, cur,sizeof(list)); printf("over\n"); } } void display(struct list **temp) { struct list*poin = *temp; { while(poin!=NULL) { printf("%d ",(int*)poin->data); poin = poin->next; } } printf("displayed\n"); } #endif