Question.3
A developer defines both an overload and a default-argument version:
void gpio_set(int pin); void gpio_set(int pin, int level = 1); gpio_set(5);
What happens?
Select Answer
Calls gpio_set(int) — exact match
gpio_set(int)
Calls gpio_set(int, int=1) — default fills in
gpio_set(int, int=1)
Compilation error — ambiguous; both are valid matches for gpio_set(5)
gpio_set(5)
Calls whichever was declared first