Question.2
A developer replaces a C macro with constexpr:
Before:
#define PRESCALER (16000000 / 9600)
After:
constexpr uint32_t PRESCALER = 16000000 / 9600;
What advantages does the constexpr version provide?
Select Answer
None -- both produce the same result
Type safety, debugger visibility, scope respect, and the same zero-runtime-cost as the macro
constexpr is slower because it adds type checking
constexpr
The macro is better because it works in C and C++