14. Function Overloading

Question.1

A UART logger has three overloads:

void log(int val)        { printf("INT:%d", val); }
void log(const char *msg){ printf("STR:%s", msg); }
void log(double val)     { printf("DBL:%.1f", val); }

log(42);
log("Fault");
log(3.14);

What is the output?

Need Help? Refer to the Quick Guide below

Select Answer