My problem is the name var in the linked list aways point to the same address .... how can i make string store on different address? I'm confusing with the string array and string pointer...Code:#include<stdio.h> #include<stdlib.h> struct list1{ char *name; struct list1 *next; }; void addname(char name[],struct list1 **node) { struct list1 *x,*ptr; x= malloc(sizeof(struct list1)); x->name=name; x->next=NULL; ptr=*node; if(*node==NULL) *node=x; else{ while(ptr->next!=NULL) ptr=ptr->next; ptr->next=x; } } int main(void) { struct list1 *nList,*ptr; FILE *fileptr; char name[BUFSIZ],dump; int counter,mark=0,sum; nList= NULL; fileptr=fopen("namelist.txt","r"); if(fileptr==NULL) perror("Unable to open file"); else{ while(fscanf(fileptr,"%[^\n]\n",name,&dump)!=EOF) { printf("%s\n",name); addname(name,&nList); } for(ptr=nList;ptr!=NULL;ptr=ptr->next) { printf("%s\n", ptr->name); } return 0; }