Practice · 2 of 4
Fix: Wrong Format Specifier
CHALLENGE
Difficulty: beginner+25 XP
Implement void format_price(double p, char *out) writing price=<value> into out with snprintf, where <value> uses printf's %g formatting for the double. The classic bug is %d with a double — yours must be correct.
Press Submit to check your solution.
Back to lesson: Practice: Warning Forensics