What is difference between using a macro and a in line function?
Answer / 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 |
Tell me what is the function of dma controlled in embedded system?
Show me a portfolio of all the applications you worked on, and tell me how you contributed to design them.
How do the mvp, mvc, and mvvm patterns relate?
What is the repository pattern? Why are patterns important?
How many types of ipc mechanism you know?
How does combination of functions reduce memory requirements in embedded systems?
Tell me is count down_to_zero loop better than count_up_loops?
Explain me what is spin lock?
Explain some of the commonly found errors in embedded systems?
Explain me why is model transformations used in the embedded system?
Describe the structure and contents of a design document, or a set of design documents, for a multi-tiered web application.
What is risc architecture?