Question.8
A firmware engineer changes a function signature from:
void log_reading(SensorData data); // Before
to:
void log_reading(const SensorData &data); // After
The SensorData struct is 64 bytes. What does this change achieve?
SensorData
Select Answer
No difference — both pass the same data to the function
data
The new version allows the function to modify the original data
The new version moves the data into the function using move semantics
The new version avoids copying and prevents modification in data variable