All challenges
Multiple ChoiceIntermediate 45s

inline function ODR exception

Why are `inline` functions allowed to be defined in multiple translation units?
Options
  1. 1The inline keyword disables the ODR entirely for that function, so any definitions are fine.
  2. 2The compiler emits one private copy in each translation unit, and all copies coexist at runtime.
  3. 3The inline keyword means the function is not linked at all and is only ever inlined at the call site.
  4. 4The ODR permits multiple identical definitions of inline functions across TUs; the linker keeps one.

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle