Here's a snippet:
void addproductInterface(Tsklep **head){
char* name = (char*)malloc(sizeof(char)*100);
double price;
do{
printf("Name: ");
scanf("%s[^\n]", name);
fflush(stdin);
printf("\nPrice: ");
scanf("%lf", &price);
fflush(stdin);
addProduct(&(*head), name, price);
} while(prompt("Do you want to add another one?"));
it works, but after I add another product, it changes the previous one (and the previous ones) to this name. It seems, that I pass the same pointer every time and I just change an array (when I add another product) it points to. do I understand it correctly? Do you have any ideas how to fix it?