Question: Macro's vs. Functions Throw-down Review C partl.pptx and/or text section 1.4.2 Reminder: Macros are available in most high-level programming languages. The body of a macro


Macro's vs. Functions Throw-down Review C partl.pptx and/or text section 1.4.2 Reminder: Macros are available in most high-level programming languages. The body of a macro is simply used to replace a macro-call during the preprocessing stage. A macro introduces a "true inline" function that is normally more efficient than an "out-1ine" function. However, macros suffer from the side-effect, unwanted, or unexpected modifications to variables. Macros should be used cautiously. The main purpose of the following programs are to demonstrate the differences between a function and a macro Other purposes include demonstrating the differences between different programming environments, and learning different ways of writing comments, formatted input and output, variable declaration and initialization, unary operation, macro definition/call, function definition/call, if-then-else and loop structures, etc. Create these functions in your code int subf(int a, int b) return a -b; int cubef(int a) f return a'aa int minf(int a, int b) { if(a
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
