Which statement is true regarding the difference between inline functions and macros in C?

  • Inline functions are always faster
  • Inline functions can access local variables
  • Macros are always inlined
  • Macros are type-safe
Inline functions in C can access local variables and provide better type safety compared to macros. Macros are simple text replacements, which may lead to unexpected behavior.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *