Question.1
Two developers define a voltage threshold:
const float THRESH1 = 3.3f / 2.0f; constexpr float THRESH2 = 3.3f / 2.0f;
What is the key difference?
Select Answer
No difference -- both are compile-time constants
const means read-only (value may be computed at runtime); constexpr guarantees the value is computed at compile time
const
constexpr
constexpr uses more Flash than const
const is compile-time; constexpr is runtime