Question: (a) Write a macro DISP(f, x) that expands into a call of printf that displays the value of the function f when called with argument
(a) Write a macro DISP(f, x) that expands into a call of printf that displays the value of the function f when called with argument x. For example, DISP (sqrt, 3.0) i should expand into print f("sqrt(%g) %g ", 3.0, sqrt (3.0)); (b) Write a macro DISP2 (f,x,y) that's similar to DISP but works for functions with two arguments. Please embed the two macros in a simple test program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
