Interview Questions and Answers :: Cisco
Home > Experience Archives > Cisco > Interview Question Set 2 > Discussion
3. Difference between macro and inline functions ?
Answer:
1. Inline follows strict parameter type checking, macros do not.
2. Macros are always expanded by preprocessor, whereas compiler may or may not replace the inline definitions.
3. Compiler has no idea about macros, compiler knows about inline functions.
4. Inline follows strict parameter type checking, macros do not.
5. Macros are always expanded by preprocessor, whereas compiler may or may not replace the inline definitions.
Amrita Sinha
10 Sep, 2016 2:48 AM
1. Inline follows strict parameter type checking, macros do not.
2. Macros are always expanded by preprocessor, whereas compiler may or may not replace the inline definitions.
3. Compiler has no idea about macros, compiler knows about inline functions.
4. Inline follows strict parameter type checking, macros do not.
5. Macros are always expanded by preprocessor, whereas compiler may or may not replace the inline definitions.
2. Macros are always expanded by preprocessor, whereas compiler may or may not replace the inline definitions.
3. Compiler has no idea about macros, compiler knows about inline functions.
4. Inline follows strict parameter type checking, macros do not.
5. Macros are always expanded by preprocessor, whereas compiler may or may not replace the inline definitions.
Report Error
Report Error
Please Login First Click Here