23.6k views
4 votes
Lab: Warm-Up: Contacts

A linked list is built in this lab. Make sure to keep track of the head node.
1 - Complete main.c to define the struct ContactNode with the following data members:
char contactName[]
char contactPhoneNumber[]
ContactNode* nextNodePtr
Add the following functions:
2 - a. initializeContactNode() with parameters for name followed by phone number (1 pt)
b. getName() - accessor (1 pt)
c. getPhoneNumber() - accessor (1 pt)
d. insertAfter() (2 pts)
e. getNext() - accessor (1 pt)
f. printContactNode()
Example: If the name is Roxanne Hughes and the phone number is 443-555-2864, printContactNode() outputs.

1 Answer

5 votes

Final answer:

This question is about implementing functions in a C program for a linked list of contacts.

Step-by-step explanation:

The subject of this question is Computers and Technology at a High School level. The question is asking for the completion and implementation of functions in a C program for a linked list of contacts. The student is required to define a struct ContactNode with data members for contact name, phone number, and a pointer to the next node. They also need to implement functions to initialize a contact node, retrieve the name and phone number, insert a new node after a given node, retrieve the next node, and print the details of a contact node.

User Dat Pham
by
7.7k points