Question: 6. (a) Write a macro DISP (f,x) that expands into a call of printf that displays the value of the function f when called
6. (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); Please embed the two macros in a simple test program! should expand into printf("sqrt (kg) = 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.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
