Question 12
Back to Exercise
What is the main effect of declaring a function inline in modern C++?
- A The call is always replaced by the body
- B The function may be defined in several translation units (e.g. in a header) without violating the one-definition rule Correct
- C The function cannot be recursive
- D The function runs at compile time
Correct Answer: Option B
Compilers decide on their own which calls to expand; the keyword's guaranteed meaning is about linkage and multiple definitions.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!