Question: Below is the code dealer.c (Project 8) Below is expected input and output of dealer.c 1. (60 points) Modify Project 8 so that the program

 Below is the code dealer.c (Project 8) Below is expected input

and output of dealer.c 1. (60 points) Modify Project 8 so that

Below is the code dealer.c (Project 8)

the program is split into three source files and two header files

1) Put all functions related to operations on the list of cars

into car.c. 2) Create a header file named car.h that contains struct

car declaration and prototypes for the functions in car. c. The header

Below is expected input and output of dealer.c

file should enclose the contents of the header file in an #ifndef-#endif

pair to protect the file 3) Put the read_line function in a

separate file named readline.c 4) Create a header file named readline.h that

1. (60 points) Modify Project 8 so that the program is split into three source files and two header files 1) Put all functions related to operations on the list of cars into car.c. 2) Create a header file named car.h that contains struct car declaration and prototypes for the functions in car. c. The header file should enclose the contents of the header file in an #ifndef-#endif pair to protect the file 3) Put the read_line function in a separate file named readline.c 4) Create a header file named readline.h that contains a prototype for the read line function. The header file should enclose the contents of the header file in an #1 fnaef-#endif pair to protect the file 5) dealer.c contains the main function. 6) Include appropriate header files in the source files 2. (40 points) Write a makefile to build the program on student cluster. The makefile should contain the following rules: 1) Build readline.o by compiling readline.c 2) Build car.oby compiling car.c 3) Build dealer.o by compiling dealer.c 4) Build dealer by linking readline.o, car.o, and dealer.o Each rule should include the name of the target file, dependencies among files, and the command to be executed. The makefile should name the executable file for the program dealer Before you submit: 1. (part 1) Compile with the following command and test with try_dealer gcc -Wall car.c readline.c dealer.c 2. (part 2) Be sure your makefile contains the information necessary to build the program. Test your makefile

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!