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 

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

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 Computer Network Questions!