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.
Loading...
Related Quiz
- A ________ pointer is a pointer that still points to a memory location that has been deallocated.
- In C, a pointer is a variable that stores the ________ of another variable.
- What is a potential risk of using the gets() function for reading strings in C?
- What is the primary purpose of using pointers in a C function?
- The function ________ is used to read formatted input from the standard input.