Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started