I need some help finishing this add function in C. It adds a person to the linke
ID: 3712230 • Letter: I
Question
I need some help finishing this add function in C. It adds a person to the linked list and the node contains first name, last name, and the phone number. Here are the structs:
typedef struct node {
char *first; // first name of the person
char *last; // last name of the person
long number; // a ten-digit phone number
struct node *nextFirst; // next item in list, ordered by first name
struct node *nextLast; // next item in list, ordered by last name
} Node;
typedef struct mlist {
Node *headFirstName;
Node *headLastName;
} MultiLinkedList;
Explanation / Answer
To be more readable i am creating a function t insert data into the linked list. Here we go,
Source Code
temp->number= num;