Question: 2. Write a simple library and a makefile to make the following codes. a. Your library consists of 3 functions: i.add(x,y): adds integers x and

 2. Write a simple library and a makefile to make the

2. Write a simple library and a makefile to make the following codes. a. Your library consists of 3 functions: i.add(x,y): adds integers x and y ii. multiply(x,y): multiplies integers x and y iii. factorial(x): calculates x factorial b. Write each function to a different file: add(), multiplyo, factorial() functions in files add.c, mult.c, fact.c respectively. c. Write a main program named proglc to read a,b,c and calculate a*b+c! using your library functions d. Write a makefile i. Write 3 rules to make add.o, mult.o, fact.o i. Write a rule to make the executable progl.exe e. First run the rules to make your library (add.o, mult.o, fact.o). Then run the rule to make your program. f. Run the executable code and check the result. g. Submit all your codes, and screenshots

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!