Question: CO2O December 2021 0 1. Write the following C program with C preprocessor directives, a. Write a header file named vars.h to define some variables

CO2O December 2021 0 1. Write the following C program with C preprocessor directives, a. Write a header file named vars.h to define some variables and write the following line in it: int b=2: b. Write a macro named sq dift(x,y) that checks if r>y, and if true, calculates x-y otherwise calculates y?-x?. (See the following example) Write a main program that has the following: detine A with value 4 call sq_diff(x,y) with parameters A and 3 TIL call sq_diff(x,y) with parameters 3*b and A+5 d. Do not include and do not use scanf/printf functions. Compile your program with -E option. This will display the expanded C code on the screen Analyze the expanded code. Take the screenshot and explain how the code is expanded Then include and printf functions to print the results of the two calls of sq_diff(x,y). Recompile and run your program. Is the output 7 and 45? If not explain and correct your code. Submit your codes, sereenshots and your explanations. f. Ex: Veigel structure in C tasb results, chsel sesult- IS same selle structure can also be written as follows in a macro: resultsasba: b 2. Write a simple library and a makefile to make the following codes. a. Your library consists of 3 functions: add(x,y): adds integers x and y mulply(x,y) multiplies integers x and y til factorial(x): calculates x factorial b. Write cach function to a different file: add(), multiply(), factorial functions in files add.c, mult.c, fact.c respectively Write a main program named proglc to read a.b,c and calculate ab Fel using your library functions Write a makefile Write 3 rules to make add.o. multo, facto 01. Write a rule to make the executable progl.exe First run the rules to make your library (add.o, multo, fact:o) Then run the rule to make your program. Run the executable code and check the result Submit all your codes, and screenshots. OR