Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This week we will create a Linked-List (data structure) that will consist of 4 source code files. You will be given three files that are

image text in transcribed

This week we will create a Linked-List (data structure) that will consist of 4 source code files. You will be given three files that are already written: main.c, createList.c and releaseMemory.c (plus a header file prog9.h), the fourth file (called p9.c-which you need to write). To copy these files to your account, perform the following commands: Login to your ctec.clark.edu account (i.e. the Linux server). At the prompt, type rightarrow mkdir prog9 At the prompt, type rightarrow cd prog9 At the prompt, type rightarrow cp/home/faculty/skoss/p9 files/*. At the prompt, type rightarrow ls -l You should now see the following 5 files listed: 1. createList.c 2. main.c 3. p9.c 4. prog9.h 5. releaseMemory.c You need to add code to the file named p9.c If you open p9.c with vi, you'll see a function definition already started as follows: void print_list (PERSON *person_ptr) { } As you can see from the function definition, you are passed a pointer (i.e. person_ptr) to a PERSON object. The pointer will be pointing at the beginning of a linked-List of PERSON objects. You need to traverse the linked-list and print the information (i.e. name & age) to the screen of each object as you traverse the list. Use the following command to build your executable: gcc main.c createFile.c p9.c releaseMemory.c p9

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Explain the strength of acid and alkali solutions with examples

Answered: 1 week ago

Question

Introduce and define metals and nonmetals and explain with examples

Answered: 1 week ago

Question

2. Enrolling employees in courses and programs.

Answered: 1 week ago

Question

1. Communicating courses and programs to employees.

Answered: 1 week ago