Exercise :: C Preprocessor - Point Out Errors
1. | Point out the error in the program
|
|||||||
Answer: Option C Explanation: The macro #define SI(p, n, r) float si; si=p*n*r/100; contains the error. To remove this error, we have to modify this macro to #define SI(p,n,r) p*n*r/100 |
2. | Point out the error in the program
|
|||||||
Answer: Option A Explanation: The conditional macro #if must have an #endif. In this program there is no #endif statement written. |