adspace
What is difference between using a macro and a in line function?
Answer Posted / Vinod Mishrwan
The main differences between macros and inline functions are:
1. Syntax: Macros are defined using the preprocessor directive #define, while inline functions are declared with the keyword inline.
2. Control flow: Inline functions follow regular C function semantics and have control over their input/output parameters, whereas macros don't have such control due to their textual replacement during the preprocessing stage.
3. Code generation: The compiler has more control over the optimization of inline functions compared to macros.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Are you still writing code? Do you love it?
What is your experience with qa engineering?
What software languages have you used to design, develop, and debug software application interfaces?
Tell me about some of your hobby projects that you've written in your off time.
Would you call yourself a craftsman (craftsperson) and what does that word mean to you?