Question: Short Answer: C Programming III Edgar Consider the following snippet of code that uses a macro to compute slope. [10 points] #define SLOPE ( delta_y,

Short Answer: C Programming III Edgar Consider the following snippet of code that uses a macro to compute slope. [10 points] #define SLOPE ( delta_y, delta_x) delta_y/delta_x void main() { double x1 = 3; double x2 = -1; double yl = 2; double y2 = 3; double slope = SLOPE(y1 - y2, x1 - x2); printf("%fl", slope); } (a) This code will not calculate the slope correctly. What will the output be? Why? Vertical Space (4cm) (b) How could you fix the problem by changing only the macro? How could you fix the problem without changing the macro
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
