Question.4
A developer wraps overloaded functions in extern "C" to make them callable from a C-based bootloader:
extern "C" { void hal_write(uint8_t val); void hal_write(uint16_t val); }
Will this compile?
Select Answer
Yes — extern "C" doesn't affect overloading
No — extern "C" disables name mangling, which is required for overloading; both functions produce the same linker symbol
Yes — but only with C++20
No — but only because uint8_t and uint16_t are both integers
uint8_t
uint16_t