Question.5
A developer creates a SensorSystem composed of bus and sensor:
SensorSystem
class SensorSystem { I2C_Bus bus; Sensor sensor; public: SensorSystem() : bus(I2C1_BASE), sensor(bus) {} };
Why is the declaration order (bus before sensor) important?
Select Answer
It is not important -- the initializer list order controls construction
The compiler sorts members by size
Members are constructed in declaration order
Declaration order only affects destruction, not construction