Question: Write a function to insert a name at the end of a linked list? (C) I have a linked list: struct node { char person
Write a function to insert a name at the end of a linked list? (C)
I have a linked list:
struct node { char person[100]; struct node *next; };
int main() { struct node *new_node; new_node=malloc(sizeof(struct node)); printf("Please enter a name: "); scanf("%s", ); }
How do I get the name from the user and write a function to add it to the end of the linked list? I'm not supposed to use the insert() library function, which is why I'm having trouble.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
